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
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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.