Jump to content

[SOLVED] Cookies - set path but not expire time?


opalelement

Recommended Posts

I have a login script that I need to set the path on when I make the cookies... But I also have a remember me option. How would I make it so that the non-remember me cookies expire like normal at the end of the session, but still have a path of "/"?

 

I tried this:

				if(isset($_POST['remember']))
			{
				setcookie("username", $name, time()+2592000, "/");
				setcookie("password", enc($pass), time()+2592000, "/");
			}
			else
			{
				setcookie("username", $name, "", "/");
				setcookie("password", enc($pass), "", "/");
			}

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.