Jump to content

check my security input against hackers


Monkuar

Recommended Posts

if ($ibforums->input['display1'] == "1"){
//

}else{
$std->Error2("You're being Nawty!");
}

 

Ok, this works fine.  If they submit anything other then "1" for that input it shows "you're being nawty" but I want it to beable to be anything besides 1 or 0

 

so I added

 

if ($ibforums->input['display1'] == "0" OR "1"){
//
}else{
$std->Error2("You're being Nawty!");
}

 

and it still let's me submit anything...... i only want my $ibforums->input['display1'] to accept 1 or 0 as a input!!!! I don't want any hackers submitting other input values for this field! any help?!

 

Link to comment
https://forums.phpfreaks.com/topic/255157-check-my-security-input-against-hackers/
Share on other sites

if ($ibforums->input['display1'] == 0 OR $ibforums->input['display1'] == 1){

 

When using logical operators in an if statement you have to use the whole condition again.

 

wow i feel like  aturd

 

thank you

 

topic solved

 

sometimes my brain just farts

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.