Jump to content


Photo

COOKIE HELP NEEDED


  • Please log in to reply
2 replies to this topic

#1 JSHINER

JSHINER
  • Members
  • PipPipPip
  • Advanced Member
  • 465 posts
  • LocationBoston, MA

Posted 20 September 2006 - 08:41 PM

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

#2 JSHINER

JSHINER
  • Members
  • PipPipPip
  • Advanced Member
  • 465 posts
  • LocationBoston, MA

Posted 20 September 2006 - 08:44 PM

I need it to direct to a part of the .php file: filename.php?action=search&zip=01007

#3 HuggieBear

HuggieBear
  • Members
  • PipPipPip
  • Advanced Member
  • 1,899 posts
  • LocationEngland, UK

Posted 20 September 2006 - 10:14 PM

OK, I'll give you a few pointers...

1. You need to add a cookie using setcookie()
2. You read it by just using it's name in the predefined variable $_COOKIE e.g. if ($_COOKIE['zipcode']){...

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

Regards
Huggie
Advice to MySQL users: Get phpMyAdmin and test your queries work there first, take half the hassle out of diagnosis, also check the reserved words list.

Links: PHP Docs :: RegEx's :: MySQL :: DevGuru :: w3schools




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users