<style type="text/css">
a:link { text-decoration: none; color: blue; }
a:visited { text-decoration: none; color: blue; }
a:active { text-decoration: none; color: blue; }
a:hover { text-decoration: none; color: red; }
.gastenboek { width: 400; border:1 solid black; }
.naam {font-family:arial; font-size:12; width:100; font-weight:bold; }
.naam2 {font-family:arial; font-size:12; }
.email {font-family:arial; font-size:12; font-weight:bold; }
.email2 {font-family:arial; font-size:12; }
.bericht {font-family:arial; font-size:12; font-weight:bold; }
.bericht2 {font-family:arial; font-size:12; }
body,tr,td { font-family: arial; font-size:12; }
</style>
<html>
<head>
<title>Gastenboek</title>
</head>
<body>
<center>
<?
$van='Jacob';
$naam=$_REQUEST['naam'] ;
$email=$_REQUEST['email'] ;
$status=$_REQUEST['status'];
$bericht=$_REQUEST['bericht'];
if($status=="") {
print("<h1>Gastenboek van ".$van."<br></h1>\n\n");
echo "<!-- hier beginnen de berichten -->";
include("gasten.txt");
echo "<!-- hier stoppen de berichten -->";
print("<br><br><hr><br><a href='gastenboek.php?status=add&naam=$naam'>Voeg een bericht toe</a>");
};
if($status=="add") {
print("<form action='gastenboek.php'>");
print("voer hier je naam in:<br>");
print("<input type='text' name='naam' value='$naam' ><br>");
print("voer hier je email in:<br>");
print("<input type='text' name='email' ><br><br>");
print("Vul hier je bericht in:<br>");
print("<textarea name='bericht' rows='10' cols='50'></textarea><br><br>");
print("<input type='hidden' name='status' value='save'>");
print("<input type='submit' value='Voeg je bericht toe'>");
print("</form>");
};
if($status=="save") {
$file = fopen("gasten.txt","a");
fputs($file, "<table class=gastenboek>");
fputs($file, "<tr><td class=naam>Naam:<td class=naam2>$naam<br></tr></td>");
fputs($file, "<tr><td class=email>Email:<td class=email2><a href='mailto:$email'>$email</a></tr></td>");
fputs($file, "<tr><td class=bericht>bericht:<td class=bericht2>$bericht</td></tr>");
fputs($file, "</table><BR><BR>\n");
fclose($file);
print("Gesaved, klik <a href='gastenboek.php'>hier</a> om de berichten te bekijken.");
};
print("<BR><small>Made by <a href='http://jacob.slompinfo.nl' target=_blank>Jacob Slomp</a></small>");
?>
</center>
</body>
</html>