<?
include("menu.php");
include("forb.php");
include("check.php");
$q1 = mysql_query("SELECT * FROM brugere WHERE id = '$_GET[id]'");
$ses = mysql_fetch_array($q1);
print "
<form action='skriv_gb.php?brugernavn=$ses[brugernavn]' method='POST'>
<input type='text' name='besked'> <input type='submit' value='Skriv'>";
$query = mysql_query("select * from gestebog where til = '$ses[brugernavn]' ORDER by id DESC");
$antal = mysql_num_rows($query);
print "<br>Ialt <b>$antal</b> beskeder!<hr>";
while($vis = mysql_fetch_array($query)){
?>
Skrevet af <a href='profil.php?b=<?php print"$vis[af]";?>'><b><?php print"$vis[af]";?></b></a> d.<?php print"$vis[dato]";?><br>
<?php print"$vis[besked]";?><hr>
<?
}
?>