session_start(); $Section="Profile"; $SectionImage="top_profile.gif"; include ("includes/header.inc.php"); include ("admin/mysql.inc.php"); if ($atn == 'addentry') { include('validate.inc.php'); if ($name == "" || chk_wds($name)) $errors[] = ("
» Name is not valid. Please try again.
"); if (!chk_eml($email)) $errors[] = ("» Please enter a valid email address.
"); if ($descr == "" || chk_wds($descr)) $errors[] = ("» Your message is empty or not valid
"); if(count($errors)) { $has_errors = true; $atn = "add"; } if (!$has_errors){ $thedate = date("Y-m-d"); query("INSERT INTO guestbook SET name='$name',phone='$phone',email='$email',descr='$descr',date='$thedate'"); ?>Thank-You for signing my guestbook.
include "includes/footer.inc.php"; die (); } } if ($atn == "add") { ?>No Entries Available
Page: "; for($i = 0; $i < $pages; $i++) { $p_offset = $i * $pp; $actual = $i + 1; if ($actual == $opg) { echo "[$actual] "; } else { echo "[$actual] "; } } print "
"; print "
| Name | Date | Comment |
|---|---|---|
" . $data['name'] . " | ";
print "". $mysqldate . " | ";
print "". $data['descr'] . " | ";
print "