PDA

View Full Version : wap & php



osperuco
07-27-2007, 10:21 AM
Hi, Im trying wap & php. Does somebody try it here before?

charlesgan
07-27-2007, 10:59 AM
wap application??
try TagTag.com used them before.

osperuco
07-27-2007, 05:21 PM
Thanks for the reply. Im trying to make a single wml file like:

<?php
header ("Content-type:text/vnd.wap.wml; charset=utf-8");
echo "<?xml version="1.0"?> "
$cn=mysql_connect($_server,$_user,$_password) or die (mysql_error());
mysql_select_db($_bd);
$query="show tables";
$rs=mysql_query($query,$cn);
$data="";
while($row=mysql_fetch_array($rs))
{
$data.="<p>".$row[0]."</p>";
};
?>
<wml>
<card id="card1" title="TableShow">
<?php
print $data;
?>
</card>
</wml>

(saved as test.wml)

(a) The problem is that php is not executed, so I get a blank page.

(b) When I add in cPanel a MIME Type:
application/x-httpd-php .wml
I get a http 500 error (php is executed (maybe?))

PS: is there a way to get adviced -via email- when somebody make a post here?

charlesp
07-30-2007, 08:41 PM
Save it as test.php. That should parse the php code.

Yes you can request a private message be sent to you. But the idea behind a forum is to share the information so that others may benefit as well.

Basil
07-31-2007, 01:34 AM
No no they meant if they could be notified by email when somebody responds to this thread I believe. It's in a section labeled 'Additional Options' when you scroll down the page where you make your post (advanced), called Thread Subscription.

Also, at the top of the page there's a menu labeled 'Thread Tools', you can click on that and subscribe to the thread as well.

charlesp
07-31-2007, 05:38 PM
Oh, sorry.:o