Jump to content

Archived

This topic is now archived and is closed to further replies.

JSHINER

COOKIE HELP NEEDED

Recommended Posts

My post below asks for help with zip codes, and I need further help.... different topic.

I want an option to "Remember My Zip Code" so users returning don't have to enter it again. Any help would be much appreciated.

Thank you,

James

Share this post


Link to post
Share on other sites
I need it to direct to a part of the .php file: filename.php?action=search&zip=01007

Share this post


Link to post
Share on other sites
OK, I'll give you a few pointers...

1. You need to add a cookie using [url=http://uk.php.net/manual/en/function.setcookie.php]setcookie()[/url]
2. You read it by just using it's name in the [url=http://uk.php.net/manual/en/language.variables.predefined.php]predefined variable[/url] $_COOKIE e.g. if ($_COOKIE['zipcode']){...

Give it a go with this info then let us know how you get on.

Regards
Huggie

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.