Precisely Speaking
February 08, 2012, 02:51:05 AM
Welcome,
Guest
. Please
login
or
register
.
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: So what's news with you? Tell us about it in "Getting To Know You"!
Home
Help
Calendar
Login
Register
Precisely Speaking
>
Training and Education
>
Web Programming Questions
>
PHP Session Management
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: PHP Session Management (Read 2253 times)
precisonline
President/Chief Technologist
Administrator
Rock Star
Posts: 1524
PHP Session Management
«
on:
May 09, 2008, 04:06:41 PM »
Stumbled upon something interesting. In PHP we have session_start() to start a session, but there's no session_end() or session_close() that closes up everything nice and neat. Yes, there is a session_destroy() which removes the server side variables, but ... it leaves the client cookie intact! So if you need to close up both sides of the session - and hey
why not?
- try this:
function session_close()
{
setcookie(session_name(),false); // Kill the cookie on the client
session_destroy(); // ...then kill the server side info
}
«
Last Edit: July 20, 2008, 11:11:36 AM by precisonline
»
Logged
-Kevin
Accidents "happen"; success, however, is planned and executed.
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> Getting To Know You
=> Announcements
=> Big Thoughts / Cool Ideas
=> Rants & Raves
-----------------------------
Application Support
-----------------------------
=> Red Leaf
=> Activant/Prelude Support
=> Summit Support
=> Avante Support
=> PRC Support
-----------------------------
Training and Education
-----------------------------
=> Connect!
=> U2 Programming Questions
=> SB+ Programming Questions
=> Web Programming Questions
=> Business Intelligence / MITS
=> PC / Hardware / Miscellaneous Support
Loading...