hej jeg har den her blåbog kode og det skal være sådan at den skrive til det id man nu er ind på men det skrive bare til id=0 hver gang plzz help
<?php
include("config.php");
if($_POST['send'] && $_POST['name'] != "navn" && isset($_POST['name'])){
$_POST['text'] = ereg_replace("<([^>]+)>", "", $_POST['text']);
mysql_query("INSERT INTO commentbog (bogid, text, name, mail) values ('$_POST[bogid]', '$_POST[text]', '$_POST[name]', '$_POST[mail]')");
}
?>
<html>
<head>
<title>blåbog.</title>
</head>
<body>
<?php
$query = mysql_query("SELECT id, info, alder, name FROM klasse WHERE id='$_GET[id]'");
echo "<p align='center'><b>$row[navn]</b></p>";
echo "<p align='left'><font size='1' face='Tahoma'>";
echo nl2br($row['info']);
echo "</font><p align='left'><font size='1' face='Tahoma'>navn: [$row[navn]]</font></p>";
echo "<p align='left'><a href='bog.php'><-- tilbage </a></p>";
?>
<p align="center"><b>skriv i denne blåbog</b></p>
<hr size="1" color="#000000">
<div align="center">
<center>
<table border="0" width="350">
<?php
$query = mysql_query("SELECT name, text, mail FROM commentbog WHERE bogid='$_GET[id]' ORDER BY id DESC");
while ($rows = mysql_fetch_array($query)) {
echo "<tr>";
echo "<td width='100%'>";
echo "<hr size='1' color='#000000' noshade>";
echo "<p><b>".nl2br($rows['text'])."</b><b><br>";
echo "</b>af <a href='mailto:$row[mail]'>$rows[name]</a></td>";
echo "</tr>";
}
?>
</table>
</center>
</div>
<hr size="1" color="#000000" noshade width="350">
<form action="<?php echo $_SERVER['PHP_SELF']."?id=$_GET[id]"; ?>" method="post">
<p align="center"><input type="text" name="name" size="20" value="navn"><br>
<input type="text" name="mail" size="20" value="e-mail"></p>
<p align="center"><textarea rows="2" name="text" cols="20">skrive i den blåbog</textarea></p>
<p align="center"><input type="submit" value="Send" name="send"></p>
<input type="hidden" name="bogid" value="<?php echo $row['id']; ?>">
</form>
<p align="left"> </p>
</body>
</html>