thaidomizil Posted September 6, 2011 Share Posted September 6, 2011 Hello, is it possible to define the next page after a form submission based on a value from the form ? Example: My form has a dropdown Value 1: Flight Value 2: Flight + Hotel now i'm trying to achieve that if value 1 is chosen after submission it goes to flight.php, if value 2 it should go to flighthotel.php or am i heading into the completely wrong direction here and over complicating things ? Thanks in advance ! Link to comment https://forums.phpfreaks.com/topic/246542-next-shown-page-based-on-form-selection/ Share on other sites More sharing options...
Pikachu2000 Posted September 6, 2011 Share Posted September 6, 2011 or am i heading into the completely wrong direction here and over complicating things ? Yes. You should be able to write one script to process the form conditionally, based on the selected values. Link to comment https://forums.phpfreaks.com/topic/246542-next-shown-page-based-on-form-selection/#findComment-1265980 Share on other sites More sharing options...
voip03 Posted September 6, 2011 Share Posted September 6, 2011 You can use switch statement http://php.net/manual/en/control-structures.switch.php Link to comment https://forums.phpfreaks.com/topic/246542-next-shown-page-based-on-form-selection/#findComment-1265985 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.