Need help PLEASE


Posted on 16th Feb 2014 07:03 pm 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

Did you know?Explore Trending and Topic pages for more stories like this.
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
No comments posted yet

Your Answer:

Login to answer
266 Like 45 Dislike
Previous forums Next forums
Other forums

Pipe email to PHP - get mail adress from MySQL - send?
Hi all,

this is the challenge:

1) Our faculty at the college where I'm employed includ

C - Reading a file into a byte array
Hi,

I'm trying to read a file into a byte array in C. I have to use C as this is for a loadru

Undefined variable when using $_SERVER['PHP_SELF']
Hi guyz, please suggest me something...
On first.php I have one input field NAME, and on posting

file_put_contents and createimagefromjpeg
All,
I do somethings and then I have the following code:
file_put_contents('./test/'.$filename

Please help - should be a simple fix.. driving me nuts
Everything seemed to be working fine. I have a table, it alphabetically lists a bunch of cities and

validating url
im trying to validate url's sent to me by a form
the url's im collecting are for placing banners

Setting/Modify Headers using mail() function
I have a question about setting email headers when using mail() in a php script.

When I send

Two warning messages
Quote<b>Warning</b>: mysql_real_escape_string() expects parameter 1 to

show random images
hey guys

can someone please suggest a way in which the following code can be edited so it onl

Changing color in GD via variable?
Hey guys, I'm new here. x)

I'm very much a noob when it comes to PHP, but I'm trying to learn

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash