session

You are browsing the archives of "session."

Setting up the logout functions to clear the user session ID

PHP & MySQL Login Tutorial Series
Pt1: Introduction
Pt2: Setting up the database
Pt3: The front end and user validation
Pt4: The code to privatize a page
Pt5: Logout function and clearing the session ID
Part 5: Logout functions
Our final function is the logout function that will wipe our session. That function is simpler and looks like this:
<?php
function logout() {
$sessionid =$_COOKIE[test_account];
@setcookie [...]