WML vs PHP and MYSQL

From: Date: Wed, 25 Apr 2001 17:38:22 +0000
Subject: WML vs PHP and MYSQL
Groups: php.db 
Request: Send a blank email to php-db+get-8882@lists.php.net to get a copy of this message
Hi, I am trying to retrieve data from MYSQL inside of PHP code which I placed under WML page. But every time I compile this file, it said compile error. Can anyone help? ----------3.php------------- <?php header("Content-type: text/vnd.wap.wml"); echo("<?xml version=\"1.0\"?>\n"); echo("<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\" \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n\n"); ?> <wml> <card id="acctnum" title="Account Number"> <p> <?php $password='1234'; if ($acctnum == $password) { include("dedb.inc"); // DB connection file. $query="SELECT * FROM uget"; $result= mysql_query($query) or die(mysql_error()); $field=mysql_num_rows($result); srand(time()); $num=rand(1,$field); $query1="SELECT * FROM uget where number='$num'"; $result1= mysql_query($query1) or die(mysql_error()); $row=mysql_fetch_array($result1); print($row["message"]); } else { print("Password wrong"); } ?> </p> </card> </wml> --------------------------------------------------------------------------- Best Regards, Kelvin.

« previous php.db (#8882) next »