miseleigh Posted June 7, 2007 Share Posted June 7, 2007 I call the following from products.php: <form action="http://www.mysite.com/products/bybrand.php" method="post"> <select name="brand" onChange="this.form.submit()"> <option value="null"> Select Manufacturer </option> <option value=1>Manufacturer 1</option> <option value=2>Manufacturer 2</option> <option value=3>Manufacturer 3</option> </select></form> but when an option is selected, the page tries to go to products.html (which doesn't exist) instead of products/bybrand.php. I have a few forms like this on products.php that are supposed to go to different pages, but they all do the same thing. Any help would be greatly appreciated. Link to comment https://forums.phpfreaks.com/topic/54650-solved-thisformsubmit-wont-go-to-the-right-page/ Share on other sites More sharing options...
miseleigh Posted June 7, 2007 Author Share Posted June 7, 2007 Well, nevermind... the original author had it redirecting back to the original products page if the varibale wasn't set and forgot to actually request it. All fixed! On products/bybrand.php: <?php Header("Cache-Control: must-revalidate"); $brand=$_REQUEST['brand']; // I added this if(!isset($brand) || $brand == "null") header("Location: ../products.php"); //was originally products.html Link to comment https://forums.phpfreaks.com/topic/54650-solved-thisformsubmit-wont-go-to-the-right-page/#findComment-270285 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.