hi im looking for a script so that when a radio button is selected and you click on the submit button it will take you to the page relevant to what you chose, eg: (0) = radio button! (0) option 1 (0) option 2 submit button if you checked option 1 and clicked submit would take you to say 1.html and if you clicked option 2 would take you to say 2.html. you can only have one button selected at one time. please help, i know this is simple but cannot work it out, sorry.
<html> <head> <title>My Page</title> </head> <body> <form name="myform" action="temp1.php" method="POST"> <div align="center"><br> <input type="radio" name="group1" value="Milk"> Milk<br> <input type="radio" name="group1" value="Butter" checked> Butter<br> <input type="radio" name="group1" value="Cheese"> Cheese </div> </form> </body> </html> it will get redirected to next page temp1.php..in this write php code follows <?php if($_POST['group1']=='Milk') header("Location : your page1); else header("Location : your page2); ?>