session_set_cookie_params

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
William
Forum Contributor
Posts: 332
Joined: Sat Oct 25, 2003 4:03 am
Location: New York City

session_set_cookie_params

Post by William »

Hello PHPDN,

I am currently working on a web site that I used sessions for. Well I'm trying to get the session_set_cookie_params() function to set it up so they stay logged in even after they close the browser. I have it set so when they login it sets certian varibles using super globals and right after they are declared I have

Code: Select all

session_set_cookie_params(time()+9999, "/", "domain.ext", false);
What am I doing wrong? Thanks for any help on this subject.
someberry
Forum Contributor
Posts: 172
Joined: Mon Apr 11, 2005 5:16 am

Post by someberry »

Couple things you may wish to try:
1. Take out the time().
2. You are doing session_start() after this command right, not before?
3. Try setting an SLD.
Post Reply