View Single Post
  #8  
Old 05-05-2011, 04:32 PM
Kaeliah's Avatar
Kaeliah Kaeliah is offline
Premium Member
 
Join Date: Sep 2010
Location: Pennsylvania, United States
Posts: 485
Gender: Female
Credits: 32,681
Kaeliah will become famous soon enough
Send a message via AIM to Kaeliah Send a message via MSN to Kaeliah
Default

Well the issue my guess is with the query. I see what the problem is. The IS NOT NULL is the issue, because even if the entry is blank, it returns not null. Bad design on my part, sorry. Try this and see if it works.

PHP Code:
        $ip $_SERVER['REMOTE_ADDR']; 
        
$ip preg_replace("/[^a-zA-Z0-9@._-]/"""$ip);
        
$ip secure($ip);
 
    
$query "SELECT * FROM ".$prefix."vote_voters WHERE ip = '$ip' AND username != ''";
    
$result = @runquery($query);
    
$num = @mysql_numrows($result);

    if(
$num 0){
    
$flag 1;
    } 
__________________
[My Shop] ♥ [My Blog] ♥ [Subscribe] ♥ [My Mods] ♥ [Mod TOS]
Reply With Quote