jwk811 Posted August 26, 2006 Share Posted August 26, 2006 Is there a way you can send someone to page after a form depending on what they entered into it? Like if the chose one thing then it will send them to this page or if they select one thing it will bring them to another page. It seems like something that would be used else where but it doesn't seem possible to be able to bring that data to either page knowing that you can make only one action on the form. Link to comment https://forums.phpfreaks.com/topic/18696-forms-q/ Share on other sites More sharing options...
Orio Posted August 26, 2006 Share Posted August 26, 2006 form.htm-[code]<form action="reffer.php" method="POST"><input type="radio" name="page" value="1">Page 1<br><input type="radio" name="page" value="2">Page 2<br><input type="radio" name="page" value="3">Page 3<br></form>[/code]reffer.php-[code]<?phpif(isset($_POST['page'])){switch($_POST['page']){case 1:header("Location: page1.php");break;case 2:header("Location: page2.php");break;case 3:header("Location: page3.php");break;}}?>[/code]Orio. Link to comment https://forums.phpfreaks.com/topic/18696-forms-q/#findComment-80605 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.