Need help with form :(

A

Anonymous

Guest
Hi,

If you use radio buttons, the way to see if a radio button has been activated is, once submitting the form checking it with isset:

if(isset($_POST['menusize1'])){
// whatever you do with menusize1
}
else if(isset($_POST['menusize2'])){
// whatever you do with menusize2
}
else if(isset($_POST['menusize2'])){
// whatever you do with menusize3
}
else{
//error, just in case
}

Where menusize1,2 and 3 are the names of the radio buttons corresponding to the different menu sizes.

Hope it helps.
 
Try and echo $_POST['name'] before the switch and see what you get
 
Back
Top