Hi,
I am using the following code to log a user out of my site
and return them to the home page etc, but it doesn't seem to work as some kind phpsessionid is carried forward which disrupts a search function I have on my homepage. Can anyone see anything I am doing incorrectly.
Tks
********************* Code *********************888
if (mysql_affected_rows() ==1)
{
$_SESSION = array();
// Destroy the session itself
session_destroy();
// destroy the cookie
setcookie (session_name(), '' , time()-300, '/' , '',0);
header ("Location: . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/thank_you.php");
}
I am using the following code to log a user out of my site
and return them to the home page etc, but it doesn't seem to work as some kind phpsessionid is carried forward which disrupts a search function I have on my homepage. Can anyone see anything I am doing incorrectly.
Tks
********************* Code *********************888
if (mysql_affected_rows() ==1)
{
$_SESSION = array();
// Destroy the session itself
session_destroy();
// destroy the cookie
setcookie (session_name(), '' , time()-300, '/' , '',0);
header ("Location: . $_SERVER['HTTP_HOST'] . dirname($_SERVER['PHP_SELF']) . "/thank_you.php");
}