|
-
Jun 25th, 2002, 09:41 AM
#1
Thread Starter
Addicted Member
setCookie Expires Never
this is probably an easy one. How do I set a cookie that never expires. Say I have a customer order something and then the next time (maybe a month or so down the road) they come back to my site. I want to have their name, address, city, state, zip, email remembered so that I they dont have to keep filling it out. And maybe even put a thing on the anchor page saying Welcome $yourName!..
-
Jun 25th, 2002, 10:51 AM
#2
Fanatic Member
you can't. You can set it to expire in a year, or 10 years even and when they come back you can reset it, but there is no way to stop it from expiring. Also note that the user has the option to clear his/her cookies too.
-Matt
-
Jun 25th, 2002, 11:21 AM
#3
Stuck in the 80s
I always set them for a year and then just have 'em reset everytime the user comes to the page.
-
Jun 25th, 2002, 11:27 AM
#4
Thread Starter
Addicted Member
oh ok, I know how to set the time on it but I thought that you could make it so that it doesn't expire. And if they delete their cookies, I can't really do anything so I'm cool with that. I'll just run with it set to a year, like The Hobo said.
Thanks all.
-
Jul 1st, 2002, 10:19 PM
#5
Junior Member
one thing, use sessions:
Sessions are stored on the server, not the client... they dont expire.. and they are easy to use
-
Jul 1st, 2002, 11:07 PM
#6
Stuck in the 80s
Originally posted by Iamryan2002
one thing, use sessions:
Sessions are stored on the server, not the client... they dont expire.. and they are easy to use
Hi. Again, sessions use cookies.
-
Jul 1st, 2002, 11:08 PM
#7
Stuck in the 80s
A visitor accessing your web site is assigned an unique id, the so-called session id. This is either stored in a cookie on the user side or is propagated in the URL.
Of course you can store it in the URL, but once they close the window, it's gone. Next time they come back, they're assigned a new session ID.
-
Jul 2nd, 2002, 05:28 AM
#8
Fanatic Member
Originally posted by Iamryan2002
one thing, use sessions:
Sessions are stored on the server, not the client... they dont expire.. and they are easy to use
Far from it. Sessions expire the second the user closes his/her browser window.
*My computer was having a fit this morning by hiding most of the posts throughout various forums so sorry for repeating what The Hobo said*
Last edited by cpradio; Jul 2nd, 2002 at 05:55 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|