I am new to PHP, and I LOVE IT!. I have a web page with a form that you enter a zip code. I have the action set to process.php.
My problem is I can not find, anywhere in my tutorials how to get the entered zip code to bring you to a different page on the site.
I need each zip code to bring you to a certain page.
or if that zip code does not = a value with a page, it will go to a generic page.
Can anyone please help me, My site has to launch very soon.
MOON
Trying to get php to use an entered zip to $_GET a URL
Moderator: General Moderators
-
MunsoonEnterprises
- Forum Newbie
- Posts: 1
- Joined: Fri Apr 24, 2009 8:46 am
-
Cryophallion
- Forum Newbie
- Posts: 10
- Joined: Fri Apr 24, 2009 9:05 am
Re: Trying to get php to use an entered zip to $_GET a URL
First, make sure you validate the data.
Then you can use the Header function, with the Location: to redirect to a new url:
http://us2.php.net/manual/en/function.header.php
you may need output buffering if you have already sent headers.
Try the lynda.com tutorials - very thorough, and they deal with this too.
Then you can use the Header function, with the Location: to redirect to a new url:
http://us2.php.net/manual/en/function.header.php
you may need output buffering if you have already sent headers.
Try the lynda.com tutorials - very thorough, and they deal with this too.