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. Quote Link to comment 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.