in reply to Re: Re: conditional submit buttons
in thread conditional submit buttons

hmmm.. what is the value of the image currently being displayed? Is $id a visitor id or the current image id?

assuming $id, $firstrec, & $lastrec are numerical codes representing current image, first image, and last image, and your image codes are sorted numerically.. maybe you're looking for something like this?

if ( $id < $lastrec ){ print $q->start_form(-name=>'displaynext',-method=>'POST',-action=>' +next.cgi'); print "<input type=hidden name=i value='$id'>"; print "<input type=hidden name=u value='$username'>"; print $q->submit(-name=>'next',-value=>'next'); print $q->end_form(); } if ( $id > $firstrec ){ print $q->start_form(-name=>'display prev',-method=>'POST',-action=> +'prev.cgi'); print "<input type=hidden name=i value='$id'>"; print "<input type=hidden name=u value='$username'>"; print $q->submit(-name=>'prev',-value=>'prev'); print $q->end_form(); }

cheers,

J