simple querying mysql in a WML card problem :(
| From: | Sandeep Hundal | Date: | Wed, 25 Apr 2001 17:56:14 +0000 |
| Subject: | simple querying mysql in a WML card problem :( | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-50328@lists.php.net to get a copy of this message | ||
hi all!
i'm trying to get simple 2 line results from mysql in a wml card, but
i can't seem to manage it. here's my code:
<?
header("Content-type: text/vnd.wap.wml");
header("Cache-Control: no-cache, must-revalidate");
header("Pragma: no-cache");
echo ("<?xml version='1.0'?>");
?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">";
<?
include ("db.php");
$query1 = "SELECT club FROM table WHERE day='monday' ";
echo "
<wml>
<card id="card1" title="clubbing by day">
<p>";
$result1 = mysql_query($query1);
if ($result1) {
echo " $day <br>";
while ($r1 = mysql_fetch_array($result1)) {
extract($r1);
echo "$clubdetails <br>";
}
}
mysql_free_result($result1);
echo " </p>
</card>
</wml>";
?>
simple? yet all it seems to give m is :
--------------------
; = mysql_query( if ( { echo "
; while ( = mysql_fetch_array( { extract( echo "
; } }mysql_free_result( "
---------------------
in my emulator (WinWAP).
Any help greatly appreciated!
/sandeep
____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie