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

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

passthru() help
Hi everyone,
I'm new to the forum and to PHP. I have some pretty good experience writing shell sc

Unidentified index error in a simple form
I have been trying to make an HTML form that is handled by a PHP script. So far my attempts to get i

restricting another login once you logout
Hello,

how can I restrict a page from login authenticating against info in a MySQL DB for a s

Production of mango in processing industry
Hi,

We have one scenario ,company is in process industry,they are manufacturing MANGO pul

Merger of 6 sister companies under one flagship company after go live
Dear Experts,
I need one help regarding Merger of sister companies of same group. currently we

How to give the privillege for triggers?
Hi,

How to give the privillage for triggers to particular user?

Please let me

Protecting forms
Alright, I want to protect some forms of mine from SQL Injections, because I had someone earlier spa

Extracting Long text from message class with parameters
Hi,

I would like to extract the long text from a message class. However, the long text ha

Contact Form Not Working When I Add Validation Codes
So I built my first working PHP "Contact Us" like form. But, I have been trying to now mak

unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_
Can anyone view my code and tell me why im getting the error:
Parse error: syntax error, unexpect

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