Ok I changed it and still getting this error just opening the page up..
$sql = "SELECT user_ip FROM note where user_ip='$IPADDRESS' and date-$time >= 900";
$result = mysql_query($sql) or die(mysql_error());
$num = mysql_num_rows($result);
Here is the error :
You have an error in your SQL syntax near '-1109273129 >= 900' at line 1
Something to do with the time