Displaying WML over multiple cards from MYSQL -Please help
The line at the bottom <<<....">....>>> the $pagenext phrase will not work. I can get similar PHP to work in HDML and HTML. I just can't figure out what's wrong. Any help would be greatly appreciated!Thanks.Bill billy.wilson@rogers.com
<?php header("content-type:text/vnd.wap.wml"); ?>
<?php print '<?xml version="1.0"?>'; ?>
<?php print '<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"'; ?>
<?php print '"http://www.wapforum.org/DTD/wml_1.1.xml">'; ?>
<wml>
<card id="card1" title="XXXXXXX">
<p mode="nowrap">
<?php
$connection = mysql_connect("localhost",
"XXXXX", "XXXXXX")or die ("Couldn't connect to database");
$db = mysql_select_db("a0012290") or die ("Couldn't select DB");
$limit = 5;
$sqlcount= "SELECT ROWA, ROWB, City FROM EXAMPLETABLE WHERE City='$city' ORDER BY ROWA";
$sql_countresult = mysql_query($sqlcount, $connection) or die ("Couldn't execute query");
$totalrows = mysql_num_rows($sql_countresult);
if(empty($page)){
$page = 1;
}
$limitvalue1 = $page*$limit-($limit);
$sql = "SELECT ROWA, ROWB, City FROM EXAMPLETABLE WHERE City='$city' ORDER BY ROWA LIMIT $limitvalue1, $limit";
$sql_result = mysql_query($sql, $connection) or die ("Couldn't execute query");
while ( $row = mysql_fetch_array($sql_result) ) {
echo("<a href='wtai://wp/mc;" . $row["ROWB"] . "'>");
echo("" . $row["ROWA"] . " ");
echo("" . $row["ROWB"] . "</a><br/>");
}
echo "</p>";
if(($totalrows-($limit$page)) > 0){
$pagenext = $page+1;
echo "<do type=\"accept\" label=\"more\" name=\"more\"><go href=\"EXAMPLE.php?city=$city&page=$pagenext\"></go></do>"; // if the totalrows - $limit $page is > 0 (meaning there is a remainder), leave the next button.
}
mysql_free_result($sql_result);
mysql_close($connection);
?>
</card>
</wml>