You are here: Cookie expires at end of session « PHP Programming Language « IT news, forums, messages
Cookie expires at end of session

Posted by T.Taylor on 12/07/06 18:28

I am using a session to store user info and a cookie to store their
username. When the user returns to the site I would like the username
to be loaded from the cookie but it expires as soon as you close the
browser. How can I stop the cookie from expiring when the browser
closes?

setcookie($cookiename,$cookievalue,time()+(60*60*24*90),$cookiepath,$cookiedomain);

Thanks in advance.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация