Can you please tell me why both the PHP and Javascript versions can't delete the cookie target of the script named "t"?
(no httponly, and has been created via js btw)
<?php
include('functions.php');
sec_session_start();
$lang = check_lang();
include("../config/lang/".$lang.".php");
// Unset all session values
$_SESSION = array();
// get session parameters
$params = session_get_cookie_params();
// Delete the actual cookie.
setcookie(session_name(), '', time() - 42000, $params["path"], $params["domain"], $params["secure"], $params["httponly"]);
setcookie('t',"",-3600); //<-- this one doesn't work)
// Destroy session
session_destroy();
echo "<script language='javascript'>
function del_cookie(name) {
document.cookie = name + '=; expires=Thu, 01-Jan-70 00:00:01 GMT;';
}
del_cookie('t'); //<-- this one neither.
</script>
<h1>$l[logout_ok]</h1>";
?>