Jump to content


Photo

Just have a cookie for the session and thats it


  • Please log in to reply
2 replies to this topic

#1 djanim8

djanim8
  • Members
  • PipPipPip
  • Advanced Member
  • 42 posts

Posted 25 May 2006 - 07:55 PM

I'm not sure how to get the cookie to set only from the time they login in, until they close the browser...

this is what I have currently

setcookie("Login",$txtLogin,time()+60*60,"","myurl.com",0);

that just sets it for an hour, but I want it to ask them for a login EVERY time after they clothes the browser.

Is there a way to do that?

#2 rab

rab
  • Members
  • PipPipPip
  • Advanced Member
  • 155 posts

Posted 25 May 2006 - 09:24 PM

$_SESSION['name'] = $loginname;
...

Sessions close when the browser closes, so I think this is what your looking for.

#3 nogray

nogray
  • Members
  • PipPipPip
  • Advanced Member
  • 930 posts
  • LocationSan Francisco CA

Posted 25 May 2006 - 09:39 PM

or setcookie("Login", $txtLogin), this will delete the cookie when they close the browser.

NoGray.com





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users