...

View Full Version : Cookies, Thats javascript right?



GO ILLINI
07-03-2005, 05:53 AM
Well...
What I am doing is you are at a page and you enter a number in a text box and it takes you to a certian page. And the help I need is when to set the expiration date. I cant make it a single date or every time no matter what number they press they will go to the same page, the first one. Is there a way to say to use it only once? Or delete it after it uses it?

vwphillips
07-03-2005, 06:21 PM
The idea is that the expiery date is set to the current date plus a period time

the cookie will be deleted on that date

if you revisit the page the expiery date will be from that visit

to delete the cookie set the date to a date prior to the current date.

There are many articas on the web that can expain this more fully

Mr J
07-03-2005, 10:23 PM
Can you post your code?

I have a cookie script that only allows a function to be run once within a set number of days.

You can set the number of days the cookie remains active.

For an example see

www.huntingground.freeserve.co.uk/scripts/cookies/cookonce.htm

This may be adapted to suit your needs

GO ILLINI
07-04-2005, 06:06 AM
Sorry can't show you the code, I deleted it and am gonna start over. but from your post I have a pretty good idea of what to do now. Thanks



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum