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. Quote Link to comment 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 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.