Can anyone tell me whats wrong with the below code? it doesnt execute.

$ip=$_SERVER["REMOTE_ADDR"]; 

$banned="SELECT * FROM banned WHERE ip='$ip'"; 

if(@mysql_num_rows(mysql_query($banned)) > 0) { 

echo "You have been Banned."; 

}else{ 
echo "$ip"; 
} 

Reply via email to