M. Sokolewicz wrote: > William Stokes wrote: > >> Hello, >> Again this might be more of a HTML quetion. If so sorry about that. >> >> Anyway I was just trying to make a log out button to a page. It should >> end a session or/and close browser window. (Closing browser ends the >> session as well I think? > > no Well... depends on whether you are using the so-called "session" cookie. I.e. if your cookies have a lifetime of 0, then they *should* be destroyed when the browser is closed. http://php.net/manual/en/ref.session.php#ini.session.cookie-lifetime ... > Make a button. In the submitted form, get the session-id, destroy the > data, and remove the cookie. The output some JS to close the window. > see http://www.php.net/session_destroy for more info Agreed! Heck, you even close the browser with some JS... how well does that work? (I'm curious whether pop-up blockers / mozilla / etc. would stop JS from doing that) -- Teach a man to fish... NEW? | http://www.catb.org/~esr/faqs/smart-questions.html STFA | http://marc.theaimsgroup.com/?l=php-general&w=2 STFM | http://php.net/manual/en/index.php STFW | http://www.google.com/search?q=php LAZY | http://mycroft.mozdev.org/download.html?name=PHP&submitform=Find+search+plugins
Attachment:
signature.asc
Description: OpenPGP digital signature