RE: [PHP-DB] WML vs PHP and MYSQL

From: Date: Thu, 26 Apr 2001 08:00:39 +0000
Subject: RE: [PHP-DB] WML vs PHP and MYSQL
Groups: php.db 
Request: Send a blank email to php-db+get-8909@lists.php.net to get a copy of this message
do you have XML support installed ? i don't realy know if you need it but you might ... Steve > -----Original Message----- > From: Kelvin [mailto:kelvinyip@hotmail.com] > Sent: 25 April 2001 18:38 > To: php-db@lists.php.net > Subject: [PHP-DB] WML vs PHP and MYSQL > > > 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. > > > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.db (#8909) next »