This is a discussion on PHP WML Mysql within the PHP Language forums, part of the PHP Programming Forums category; I am trying to convert this file so that I can use it with a WAP Emulator to WML. Can ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
I am trying to convert this file so that I can use it with a WAP
Emulator to WML. Can anyone help me to convert it. I have tried what I thought was correct but keep getting error messages. <html> <body> <?php $db = mysql_connect("localhost", "root"); mysql_select_db("mydb",$db); $result = mysql_query("SELECT * FROM employees",$db); printf("First Name: %s<br>\n", mysql_result($result,0,"first")); printf("Last Name: %s<br>\n", mysql_result($result,0,"last")); printf("Address: %s<br>\n", mysql_result($result,0,"address")); printf("Position: %s<br>\n", mysql_result($result,0,"position")); ?> </body> </html> Also can anyone recommend a good WAP Emulator to use with Mysql and PHP. |
|
|||
|
Dom wrote:
> I am trying to convert this file so that I can use it with a WAP > Emulator to WML. Can anyone help me to convert it. I have tried what I > thought was correct but keep getting error messages. > WML is NOT HTML. Per example, the following: <html> <body> <br> </body> </html> will be the following in WML: <wml> <card id="myCard" title="Some title"> <br /> </card> </wml> Read up on the WAP protocol before you continue. A good place to start is: http://www.openmobilealliance.org/te.../wapindex.html JW |
|
|||
|
I understand the principles of WML. I was just wondering whether it is
possible to easily convert this HTML page into a page that can be used for WAP. I have tried to make a few modifications to change it into a WML page, but I kept getting errors about the PHP. Any help would be greatly appreciated. "Janwillem Borleffs" <jw@jwscripts.com> wrote in message news:<413b121e$0$58989$b83b6cc0@news.euronet.nl>.. . > Dom wrote: > > I am trying to convert this file so that I can use it with a WAP > > Emulator to WML. Can anyone help me to convert it. I have tried what I > > thought was correct but keep getting error messages. > > > > WML is NOT HTML. Per example, the following: > > <html> > <body> > <br> > </body> > </html> > > will be the following in WML: > > <wml> > <card id="myCard" title="Some title"> > <br /> > </card> > </wml> > > Read up on the WAP protocol before you continue. A good place to start is: > > http://www.openmobilealliance.org/te.../wapindex.html > > > JW |
|
|||
|
Dom wrote:
> I understand the principles of WML. I was just wondering whether it is > possible to easily convert this HTML page into a page that can be used > for WAP. I have tried to make a few modifications to change it into a > WML page, but I kept getting errors about the PHP. > > Any help would be greatly appreciated. > <? header("Content-Type: text/vnd.wap.wml"); // In case open_short_tag support is enabled print '<?xml version="1.0" encoding="iso-8859-1"?>'."\n"; ?> <!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml"> <wml> <card id="myCard" title="Some title"> <?php $db = mysql_connect("localhost", "root"); mysql_select_db("mydb",$db); $result = mysql_query("SELECT * FROM employees",$db); printf("First Name: %s<br />\n", mysql_result($result,0,"first")); printf("Last Name: %s<br />\n", mysql_result($result,0,"last")); printf("Address: %s<br />\n", mysql_result($result,0,"address")); printf("Position: %s<br />\n", mysql_result($result,0,"position")); ?> </card> </wml> JW |
![]() |
| Thread Tools | |
| Display Modes | |
|
|