Welcome to WebmasterWorld Guest from 54.146.230.149

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

PHP and Cookies

Hmmm Yum, Yum

     
4:46 pm on Mar 13, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 8, 2001
posts:690
votes: 0


I have some pages that are password protected. I am doing this by detecting a a cookie and if that cookie is'nt available re-directs you to the login page.

When you log in I set a cookie like setcookie("user","itsme")

HOWEVER....

The cookie keeps deleting itself, I thought that if you did'nt specify a limit thenit would last forever.

4:51 pm on Mar 13, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 6, 2000
posts:904
votes: 0


It's the other way around - if you don't specify an expiry time, the cookie lasts for just that session. If you want an 'infinite' cookie, set it to +999 days or something ;)
9:15 am on Mar 14, 2002 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:Mar 8, 2001
posts:690
votes: 0


Aha!

thanks Sugarkane, don't know why I thought the opposite.

 

Join The Conversation

Moderators and Top Contributors

Hot Threads This Week

Featured Threads

Free SEO Tools

Hire Expert Members