Disabled Select drop down checking through PHP
- by user541597
I have a couple of drop down boxes I access through POST with PHP. When the boxes are disabled and not equal to zero I have the program do something. However when they are disabled I do not want them to do anything. The way I check if the boxes are active is by using an if statement
if ($_POST['box'] != "blank"){
//do something
}
So basically I check if the box is not in the default blank position run the if statement.
However when it is disabled I am not sure how to check or what kind of value it returns if any. What can I add to the if statement so it will not go into the loop when the boxes are disabled?
I tried:
if ($_POST['box'] != "blank" || $_POST['box'] != ""){
//do something
}
But that did not work. Any ideas?