I really am frustrated at this. I want a simple Next button. and a limit of 5 records at a time. (this is an hdml site). Any other suggestions on this.THanks!!
<?php
$connection = mysql_connect("XXXX",
"XXX", "XXX")or die ("Couldn't connect to database");
$db = mysql_select_db("XXXXXXXX") or die ("Couldn't select DB");
$num = 5;
$sql = "SELECT AA, BB, City FROM Table WHERE City='$city' ORDER BY BB LIMIT $start, $num";
$sql_result = mysql_query($sql, $connection) or die ("Couldn't execute query");
//present the hdml results
while ( $row = mysql_fetch_array($sql_result) ) {
echo("<ce value='http://www.phpbuilder.com/board/archive/index.php/" . $row["BB"] . "'>");
echo("" . $row["AA"] . "");
echo("" . $row["BB"] . "");
}
//Next button link
echo "</choice><nodisplay name=card2>";
{
echo "<action type=accept task=\"go\" dest=\"products2.php?City=$city&start=$start+$num\">";
}
mysql_free_result($sql_result);
mysql_close($connection);
?>
</nodisplay>
</hdml>
<?php
$connection = mysql_connect("XXXX",
"XXX", "XXX")or die ("Couldn't connect to database");
$db = mysql_select_db("XXXXXXXX") or die ("Couldn't select DB");
$num = 5;
$sql = "SELECT AA, BB, City FROM Table WHERE City='$city' ORDER BY BB LIMIT $start, $num";
$sql_result = mysql_query($sql, $connection) or die ("Couldn't execute query");
//present the hdml results
while ( $row = mysql_fetch_array($sql_result) ) {
echo("<ce value='http://www.phpbuilder.com/board/archive/index.php/" . $row["BB"] . "'>");
echo("" . $row["AA"] . "");
echo("" . $row["BB"] . "");
}
//Next button link
echo "</choice><nodisplay name=card2>";
{
echo "<action type=accept task=\"go\" dest=\"products2.php?City=$city&start=$start+$num\">";
}
mysql_free_result($sql_result);
mysql_close($connection);
?>
</nodisplay>
</hdml>