Forum Moderators: coopster

Message Too Old, No Replies

PHP on mobile web sites

Possible?

         

derek mcgilvray

5:58 pm on Apr 7, 2007 (gmt 0)

10+ Year Member



Hi folks,

I've been reading up on this topic but with very little luck so far, hence the direct post.

As far as I can gather, for anything to show on a mobile web page, the page must be written in xhtml. Is there any way to include php? My efforts thus far have failed.

Instance 1: I have renamed the page .php and included an excerpt of php and this did not show. Nothing showing.
Instance 2: I renamed the page .php and echoed everything from dtd down to </html>. Nothing showing.
Instance 3: I have kept the page .xhtml and included excerpts of php. Nothing showing.

I AM a novice but can't find any answers (in my language!) anywhere. Is it possible, and if not, can anyone point me in the right direction (in the end I would like to query a mysql database from a mobile phone).

I will appreciate any comments.

Derek

jdMorgan

6:28 pm on Apr 7, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Have you configured your server to parse the .xhtml filetypes (and the other filetypes you tried) for PHP code? If not, then the PHP code won't do anything, and it'll likely be echoed to the browser as text. If the browser is already confused, it may not render anything -- and mobile browsers are easy to confuse.

I'd suggest you start with a VERY simple "Hello World" static (HTML) page, and progressively modify it until either it breaks or you succeed. Taking it one step at a time will greatly simplify the task.

Jim