I am moving throught a set of records, my next works great but previous move
to the first record. Also what is the best way to check and see if it is the
first or last record in the set.
if($move == "Next")
{
$next_rec = "select * from people where contactid > $rec_id limit 1";
$results = mysql_query($next_rec);
$row = mysql_fetch_row($results);
include("http://localhost/keith-homes/hyperlink.php?val=$row[0]");
exit;
}
elseif($move == "Previous")
{
$next_rec = "select * from people where contactid < $rec_id limit 1";
$results = mysql_query($next_rec);
$row = mysql_fetch_row($results);
include("http://localhost/keith-homes/hyperlink.php?val=$row[0]");
exit;
}