Drop-down box

If I have 3 Options

OP1 OP2 OP3 how can php determine which option is selected?

When the form is submitted via POST, the variable $_POST[“id”][0] will contain the value of the first option selected, and if any other options were selected, $_POST[“id”][1] and $_POST[“id”][2] will be filled with them, respectively. So if someone selected option 1 and 3, $_POST[“id”][0] would equal “1”, and $_POST[“id”][1] would equal “3”. The same would work with GET, except all variables would be changed to $_GET instead of course.

Anyways that was untested, I might be wrong but I think that’s how it would work - call it an educated guess? lol

Sponsor our Newsletter | Privacy Policy | Terms of Service