<?
session_start();
?>
<html>
<head>
<body>
<link rel="stylesheet" type="text/css" href="style.css">
<?
include("forb.php");
include("check.php");
$q1 = mysql_query("SELECT * FROM brugere WHERE brugernavn = '$_GET[brugernavn]'");
$se = mysql_fetch_array($q1);
$dato = date("d/m/y h:i:s");
$til = $_GET[brugernavn];
$fra = $_SESSION[Brugernavn];
$ip = $_SERVER[REMOTE_ADDR];
mysql_query("INSERT INTO gestebog (til, dato, besked, ip, af) VALUES ('$til', '$dato', '$_POST[besked]', '$ip', '$fra')")or die(mysql_error());
print "<meta http-equiv='refresh' content='0; url=gaestebog.php?id=$se[id]'>";
?>