Too many problems!! I constructed this from various functions from a book as I'm trying to learn php and meet my deadline, but I changed so many things I barly know what's happening.
This script is envoked by clicking the submit button of drop-down list. The items look fantastic however 2 issues here.
1.) The results is allows missing 1 row. I the query should (i.e)return 6 rows however I'm only getting 5 rows in my table.
2.) There all the same! So when you view the page you see (i.e.) only 5 rows in the table but the data is all the same as the first row.
And my last problem is that my next/prev link just work correctly. It's giving the results of something completely else. Help please, anyone, on any part Please. Thank you in advance. P.S. if you need any more info just ask.
<?php
if (empty($offset)) { $offset = 0; }
// select_entries() (declared in header.php) should return a mysql result set identifier
$query = "select *
from restaurant
where specialty1='$food'
order by rest_name asc
limit $offset, $limit
";
$result = safe_query($query);
// set_result_variables() makes items in the select global
set_result_variables($result);
echo " <table width=\"500\" summary=\"toc\" cellpadding=\"5\" cellspacing=\"0\" border=\"1\" bgcolor=\"#ffffff\">\n";
while ($row = mysql_fetch_array($result))
{
echo " <tr>\n";
echo " <td width=\"250\" align=\"left\" valign=\"middle\">\n";
echo " <font face=\"ms ui gothic\" size=\"3\">\n";
echo $rest_name;
echo " <br>\n";
echo $rest_address;
echo " <br>\n";
echo $rest_city, $rest_state, " ", $rest_zip;
echo " <br>\n";
echo " </font>\n";
echo " </td>\n";
echo " </tr>\n";
}
echo " </table>\n";
// release memory associated with this mysql result set
mysql_free_result($result);
?>
</table>
<?php nav($offset); ?>
<?php include "end_page.php"; ?>