What am I doing wrong? (php code inside)

Discussion in 'PHP' started by Crayz, Feb 3, 2007.

  1. #1
    $ip = $_SERVER['REMOTE_ADDR'];
    
    	$AntiCheat = array();
    	$sqlAntiCheat = "SELECT * FROM tbl_ips WHERE ips='$ip'";
    	$result = @mysql_query($sqlAntiCheat) or die("<font color='#ff0000'>Under Construction - Check again soon!</font>");
    
    	if(mysql_num_rows($result)>0){
    
    	} else {
    Code (markup):
    Can anyone tell me what I did wrong?

    Thanks.
     
    Crayz, Feb 3, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    And the problem is? Try or die(mysql_error()) rather than this error message that doesn't give you any information.
     
    nico_swd, Feb 3, 2007 IP
  3. Crayz

    Crayz Well-Known Member

    Messages:
    708
    Likes Received:
    9
    Best Answers:
    1
    Trophy Points:
    120
    #3
    Oh, thanks. Putting in or die(mysql_error()) instead told me what was wrong.
     
    Crayz, Feb 3, 2007 IP