Forum Moderators: coopster
I am looking to have a user type in their zip code to be redirected to another page. Thats all I need the form to do but I really dont know how. I can find the list of zip codes but I dont understand if then statements (yet my book is on the way) and could use some help in the interim.
Again thanks in advance.
So when someone submits the form with their zipcode in it to the form processor script it will compare the zipcode to a master list and process accordingly. Makes sense so far.
I haven't really done ny zip code redirection but it depends on how many options you have available and where you are getting them from. Are you going to store the master list in mysql? You could store each match with the appropriate page and select it.
There are a million ways to build the whole method I would think. Making pagenames match region names so that you can just load the page with a var and use the same var for other things with in the page.
If you plan on building a large chunk of if else statements you also might want to look at switch statements [ca.php.net]