Need help PLEASE

Posted on 16th Feb 2014 by admin

ok i have this warning showing up

Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/lalala/public_html/attack.php on line 72

the code i use
Code: [Select]//same ip resrictions
$result = mysql_query("SELECT ip FROM ip_history WHERE user_id='$target[id]'");


while($row = mysql_fetch_array($result))
{
$sendtouser[]=$row['ip'];
}


$result = mysql_query("SELECT ip FROM ip_history WHERE user_id='$logged[id]'");

reconnect();

while($row = mysql_fetch_array($result))
{
if(in_array($row['ip'], $sendtouser))
{
show_error("You cannot attack a user with the same IP.");
break;
}
}
basically what i can gather is there is no ip for the user being attacked
i want to know how to stop this error tomming up if the $target[id] user has no ip in ip history any solution or fix to this would be greatly appreciated

Other forums