Monkuar Posted January 16, 2012 Share Posted January 16, 2012 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?! Quote Link to comment https://forums.phpfreaks.com/topic/255157-check-my-security-input-against-hackers/ Share on other sites More sharing options...
scootstah Posted January 16, 2012 Share Posted January 16, 2012 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. Quote Link to comment https://forums.phpfreaks.com/topic/255157-check-my-security-input-against-hackers/#findComment-1308285 Share on other sites More sharing options...
Monkuar Posted January 16, 2012 Author Share Posted January 16, 2012 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 Quote Link to comment https://forums.phpfreaks.com/topic/255157-check-my-security-input-against-hackers/#findComment-1308292 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.