|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
Set expire time 2 munites for cookie?
hi all,
how can i set my cookie expire after 2 minutes? Response.Cookies("KensSurvey").Expires=??? please help! Thanks. |
|
#2
|
||||
|
||||
|
Hi,
The .Expires attibute will only take a date format. If the date is set to the current day then the cookie will expire when the session ends. I suppose you could also use session.timeout and set that to two minutes.. As long as there were no other session variables you wanted to keep. Kong. |
|
#3
|
|||
|
|||
|
hi, im new so i may be no help, but you could use the setcookie function, if you say the time to be time()+120, i think the +120 will make it expire 2 mins rom wen its set.
setcookie("cookie_name", "stuff to be set to the cookie", time()+120, "/", "www.domain.com") replace cookie_name with the name of the cookie, and where i put "stuff to be set to the cookie", put the data/a php variable like $stuff, now where the slash is, put the folders you want the cookie to be available to, and replace www.domain.com with your domain, its normaly good to take the www out, as that makes it compatible with more browsers or summit, prolly easier for u to read this: http://uk2.php.net/manual/en/function.setcookie.php edit: sorry! wrong forum... Last edited by benthekiller : October 1st, 2003 at 09:40 AM. |
![]() |
| Viewing: Dev Shed Forums > Programming Languages - More > ASP Programming > Set expire time 2 munites for cookie? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|