Forum Moderators: coopster
<?php
unset($_SESSION['company_id']);
unset($_SESSION['company_type']);
unset($_SESSION['username']);
unset($_SESSION['password']);
$attributes["company_id"] = '';
$attributes["company_type"] = '';
$attributes["username"] = '';
$attributes["password"] = '';
// kill session variables
$_SESSION = array(); // reset session array
session_destroy(); // destroy session.
header('Location: index.php?method=logiMain.default');
?>
However, after the login screen is display and I click back on the browser, the session variables still exist.
Please help.
setcookie ("PHPSESSID", "", time() - 3600);
i want to get away from using cookies, and tried by setting the following in php.ini
session.use_cookies = 1
but then my script stopped working, with none of the session variables set. what is the right way to set and delete session variables while not using cookies?