I\'m testing the implementation of a security check in my PHP sessions. I can successfuly detect whether the session was started from another IP address and I can successful
Use this
unset($_SESSION['ip_address'])
instead of 'unset($_session)' You can also use session_destroy.