BrianDickson Posted June 19, 2003 Share Posted June 19, 2003 I have a form on a page (the main customers page) that displays customer details. The form asks for: \"Customer name\" and Which page to goto selected from a <select> list. The first time the user goes to this page they enter a search for a company name, this takes then to a search results page with the results display as hyperliknks. when the user click on this link it takes them back to the main \"customer details\" page appending on the URL the \"CustomerID\" from the results page. The problem is that I want the user to use the drop down list to navigate to a page if the \"CustomerName\" field in the form is left blank, appending the \"customerID\" on the URL, so the page the user is being directed to can call up the relevant record. I have built an intermediate page that makes the decision on what to do next called \"wheretonext.php\" but I can only get this to work with a fixed dummy \"CustomerID\", and cant figure out how to grab or \"$_Get\" the \"CustomerID\". The re-direction code is given below: <?php $customer = $_GET[\'Customer\']; $selform = $_GET[\'selform\']; if ($customer && $selform) { header(\"location:searchresults.php?Customer=$customer\"); } else { if ($selform) header(\"location: $selform?CustomerID=4173\"); else header(\"location: originalform.php\"); } ?> Thanks in advance :?: Quote Link to comment Share on other sites More sharing options...
Freekstyle Posted August 7, 2003 Share Posted August 7, 2003 <?php $customer = $_GET[\'Customer\']; $selform = $_GET[\'selform\']; ?> Instead of that try [php:1:550e777730]<?php $customer = $_POST[\'Customer\']; $selform = $_POST[\'selform\']; ?>[/php:1:550e777730] and/or maybe the customer input field is named customer and not Customer. Maybe :? {edit}I dont get what ur asking srry{edit} 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.