Der gik kludder i den oven over...
<pre>
<html>
<head>
<title>Min gæstebog</title>
</head>
<body>
<?
$db=mysql_connect("localhost","helbo15","24222429");
mysql_select_db("gbog",$db);
$skriv=$_REQUEST[skriv];
$navn=$_REQUEST[navn];
$email=$_REQUEST[email];
$dato=$_REQUEST[dato];
$besked=$_REQUEST[besked];
if($skriv){
$besked=str_replace("\\n","<br>",$besked);
$dato_array=getdate();
$dato=$dato_array["mday"]."/".$dato_array["mon"]."-".$dato_array["year"];
mysql_query("INSERT INTO bog(navn,email,dato,besked) VALUES('$navn','$email','$dato','$besked')");
}
?>
<center>
<form method=post action=<?php echo $php_self;?>>
Navn:<input type="text" name="navn"><br>
Email:<input type="text" name="email"><br>
<textarea name="besked" cols=30 rows=5></textarea><br>
<input type="submit" name="skriv" value="send">
</form>
<br><br>
<tabel>
<?
$foresp=mysql_query("select navn,email,dato,besked from bog order by nr desc");
while($data=mysql_fetch_row($foresp)){
echo "<tr><td valign=top>";
echo "fra: <a href=\\"mailto
data[1]\\">$data[0]</a>";
echo "<br>$data[2]";
echo "</td><td valign=top>$data[3]</td></tr>";
}
?>
</table>
</center>
</body>
</html>
</pre>