My index page will be a form to enter the visitors zip code. The zip code will be used to set a cookie named zip, and the visitor will be returned a php page with the same info in the URL. The URL would be something like ;
Mysite.com/local.php?zip =12345
The zip =12345 will be the get info available for use.
This means that the zip =12345 is both stored as a cookie and appended to the URL.
When a visitor hits the index page, if they have a cookie, then they would be forwarded to Mysite.com/local.php. That page would need to get the zip information from the cookie, because it bypassed the process that added the get info to the URL. There will be other ways a visitor could be sent to that page, and under those circumstances, the? Zip =12345 would be included in the URL.
My question is, can a php script check for the cookie first, and if not found, use the get info to create the page?