ok, sorry. When the person click the button to view the next ID number's pic, or the last person, or if they put in a custom ID, it changes the value of 'next' in mysql to the same for everyone. I want it to change it only for that person. If you still need more specifics, please tell me.
function do_next() {
$nextid="update students set next=next+1, num=num+1 Where name='$userstats3[name]' ";
mysql_query($nextid) or die("Could not save next ID");
}
function do_last() {
$lastid="update students set next=next-1, num=num+1 Where name='$userstats3[name]' ";
mysql_query($lastid) or die("Could not save last ID");
}
function do_lookup() {
$idnum = $_POST['idnum'];
$lastid="update students set next='$idnum', num=num+1 Where name='$userstats3[name]' ";
mysql_query($lastid) or die("Could not save last ID");
echo '<META HTTP-EQUIV="Refresh" CONTENT="1; URL=pics.php">';