/* generated by Dynamator Wed Mar 31 19:16:34 CST 2004 */
?>
$pageMessage = '';
$fieldErrors = array();
$hasErrors = 0;
$entries = array(
array(
"name" => "Socrates",
"comment" => "To do is to be."
),
array(
"name" => "Plato",
"comment" => "To be is to do."
),
array(
"name" => "Sinatra",
"comment" => "Do be do be do."
)
);
if ( $_SERVER['REQUEST_METHOD'] == 'POST' )
{
if ( $_POST['name'] )
{
$name = $_POST['name'];
}
else
{
$hasErrors = 1;
$fieldErrors["name"] = "Please enter your name";
$name = '';
}
if ( $_POST['comment'] )
{
$comment = $_POST['comment'];
}
else
if ( ! isset($comment) )
{
$hasErrors = 1;
$fieldErrors["comment"] = "Please enter a comment";
$comment = '';
}
if ( $hasErrors )
{
$pageMessage = "Please correct the items below";
}
else
{
array_push($entries,
array("name" => $name, "comment" => $comment));
$pageMessage = "Thank you for signing my guestbook!";
$name = '';
$comment = '';
}
}
else
{
$name = '';
$comment = '';
}
?>
My Guestbook
My Guestbook
" align="center" border="0" cellpadding="5" cellspacing="1">
"> |
Guest Comments