php page redirect dependant on select box choice

natlus

New Member
I'm trying to redirect to a page but based on the answer from a select box. Basicaly in the example below, how can I get the page to redirect to "thispage.php" if p1 is selected and "thatpage.php" if p2 is selected upon submitting the form via button? I apreciate any and all comments, thank you.\[code\]<html> <body> <form name="form1"> <select name="select1"> <option value="http://stackoverflow.com/questions/3687976/p1">p1</option> <option value="http://stackoverflow.com/questions/3687976/p2">p2</option> <input type="submit"/></select> </form> </body> </html>\[/code\]?
 
Back
Top