Problem med spam på min side.
Hej eksperter!Når man skriver en besked på min side og derefter "refresher" siden bliver den gamle besked gentaget. Hvad kan jeg gøre?
Min side hedder: www.innomaxx.dk
og php koden er:
<?php
$query = 'SELECT * FROM comments ORDER BY datetimecreated DESC';
$result = mysql_query($query);
if(!$result)
{
echo '<p style="color:#C00;">Could not retrieve guestbook entries.</p>';
}
else
{
while($row = mysql_fetch_array($result))
{
echo '<p>';
echo '<strong>'.$row['name'].'</strong><br />';
echo date('F j, Y', strtotime($row['datetimecreated'])).' at '.date('g:i a', strtotime($row['datetimecreated'])).'<br />';
echo $row['comments'];
echo '</p>';
}
}
?>
<?php
if(isset($_POST['process']) and $_POST['process']==1)
{
$name = trim($_POST['name']);
$comments = trim($_POST['comments']);
$query = 'INSERT INTO comments SET
name = "'.$name.'",
comments = "'.$comments.'",
datetimecreated = NOW()';
if(mysql_query($query))
{
echo '<p style="color:#00F;">Thank you for signing our guestbook!</p>';
}
else
{
echo '<p style="color:#C00;">Sorry, your entry could not be submitted.</p>';
}
}
?>