Ok thx very much. I want to use cookies l8r when this works..
I think it should work like this, but it doesnt. Can you see whats wrong?
<?php
$db = @mysql_connect("localhost", "", "");
mysql_select_db("***", $db);
$ip=getenv(REMOTE_ADDR);
$sql = "select * from rates where REMOTE_ADDR = $ip";
$result = mysql_query($sql);
$countd = mysql_numrows($result);
?>
<?php
if ($countd == 1) {
echo "You have already commented";
} else {
echo "Comments:";
}
?>