For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > November 2004 > RE: [PHP-DB] session_destroy();









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author RE: [PHP-DB] session_destroy();
Martin Norland

2004-11-09, 3:55 pm

session_regenerate_id is what you're looking for

http://us2.php.net/manual/en/functi...generate-id.php

Note that it keeps the session data, so you still need to
session_destroy if you want to purge the data.


- Martin Norland, Database / Web Developer, International Outreach x3257
The opinion(s) contained within this email do not necessarily represent
those of St. Jude Children's Research Hospital.


-----Original Message-----
From: Chris Payne [mailto:cjp@planetoxygene.com]=20
Sent: Tuesday, November 09, 2004 12:00 AM
To: php-db@lists.php.net
Subject: [PHP-DB] session_destroy();=20


Hi there everyone,

=20

I need to destroy a session in the browser so when they log out it
clears all the session data from the browser, I have tried:

=20

session_destroy();

=20

But it doesn't seem to do it as the browser keeps the same PHPSessionID.

=20

What is the best way to destroy a session and generate a new sessionid
without having to close the browser and go back again?

=20

Chris


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.791 / Virus Database: 535 - Release Date: 11/8/2004
=20
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com