Kan ikke finde ud af hvad der er galt med den her tagwall, nogen der kan finde fejlen?
<?
if($navn && $tag) {
$tag = ereg_replace("<","<",$tag);
$tag = ereg_replace(">",">",$tag);
$tid = date("[G:i:s]");
$conn = mysql_connect("localhost", "root");
mysql_select_db("dybber");
$insertSQL = "insert into gaestebog (tid, navn, besked)
values ($tid, $navn, $tag;)";
mysql_query($insertSQL);
mysql_close($conn);
}
?>
<form action="index.php?site=tagwall" method="post">
<table border="0" align="center" cellspacing="0" cellpadding="0">
<tr>
<td>
<b>Navn</b>
<td>
<b>Tag:</b>
</td>
<td>
</td>
</tr>
<tr>
<td>
<input type="text" name="navn" maxlength="40">
</td>
<td>
<input type="text" name="tag" size="40" maxlength="200">
</td>
<td>
<input type="submit" name="skriv" value="Skriv">
</td>
</tr>
</table>
</form>
<table width="550" border="1" bordercolor="#000000" align="center" cellspacing="0" cellpadding="0" class="tagwall">
<tr><td>
<?php
$conn = mysql_connect("localhost", "root");
mysql_select_db("dybber");
$tags = mysql_query("SELECT * FROM gaestebog order by id");
while ($raekke = mysql_fetch_array($tags)) {
echo $raekke['tid']." ",
$raekke['navn']."> ",
$raekke['besked']."";
}
mysql_close($conn);
?>
</td></tr>
</table>
Hilsen
Martin Dybdal (Dybber)