Thank you for visiting Giggles & Grins Giggles & Grins Guestbook
Because of huge amounts of spam, I have turned off the guestbook for now. Sorry.
View old guestbook
include ("config.php3"); //connect mysql_pconnect( "localhost", "$username", "$password") or die( "Unable to connect to SQL server"); mysql_select_db( "$db_name") or die( "Unable to select database"); $numresults=mysql_query("SELECT name, date, email, comment FROM guestbook"); $numrows=mysql_num_rows($numresults) or die ("query 1 failed"); if (empty($offset)) { $offset=0; } $query = "SELECT name, date, email, comment FROM guestbook order by date DESC limit $offset,$limit"; $result = mysql_query ($query) or die ("query 2 failed"); while ($row = mysql_fetch_row ($result)) { for ($i = 0; $i < mysql_num_fields ($result); $i++) { if ($i > 0) print ("
"); if ($i == 0){ print "Name: "; } else if ($i == 1){ print "Date: "; } else if ($i == 2){ print "Email: "; } else{ print "Comment:
"; } print ($row[$i]); } print ""; print (" "); } if ($offset >= 3) { $prevoffset = $offset - $limit; print "PREV \n"; } $pages=intval($numrows/$limit); if ($pages < ($numrows/$limit)){ $pages=($pages + 1); } for ($i = 1; $i <= $pages; $i++) { $newoffset = $limit*($i-1); if ($newoffset == $offset) { print "$i \n"; } else { print "$i \n"; } } //show next if not last if (! ( ($offset/$limit) == ($pages - 1) ) && ($pages != 1) ) { $newoffset = $offset+$limit; print "NEXT
\n"; } ?>
Home | Surf Naked! | Daily Giggles | Cards | Stories | Jokes | Games | Conversations | Love You Forever | Pigs | Paintings | La Jolla | Nursery | Spirit | Nadalie | Halloween | Poem | Buffalos | Puppies | Easter | Disneyland | Windmill | My Zoo | Guestbook