Jump to content

Why Is This Code Not Working?


kalster

Recommended Posts

it seems that i can't get the $row variables once it is in a while loop. I have many ip fields in the table ip. i am trying to see if any of those field match the current ip. if it does then send the message.

 

$result = mysql_query("SELECT * FROM _ipaddress") or die(mysql_error());
$ip = mysql_fetch_array( $result );
$getip = getipAddress();
while($row = mysql_fetch_assoc($result)){
if ($getip == $row){
echo "you can't register with the ip of " . $getip ;
}
}

Link to comment
https://forums.phpfreaks.com/topic/270897-why-is-this-code-not-working/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.