Page 1 of 1
How to end a session?
Posted: Thu Dec 09, 2004 10:52 am
by farid
Hi !!! I want to know if someone could help :
1. If there is a function to end a session in PHP? or How do I suppose to end session_start()?
2. Exists a function to obtain the IP adress of a user in PHP?
Thanks

Posted: Thu Dec 09, 2004 12:22 pm
by lostboy
1. unset($_SESSION) will unset all session variables
2.
http://ca.php.net/manual/en/function.gethostbyname.php or $_SERVER['REMOTE_ADDR']
Posted: Thu Dec 09, 2004 12:33 pm
by vigge89
Use [php_man]session_destroy[/php_man] to end an session

Posted: Thu Dec 09, 2004 1:04 pm
by patrikG
DO NOT doublepost, farid. Normally I would delete this, but since it has replies, I'll just lock it.
Thankss!!!
Posted: Thu Dec 09, 2004 1:47 pm
by farid
Thanks everyone, and sorry about the double post man!!
