| | |
|
|
|
cookie expiration is not working.... |
| message from msa on 20 Jul 2004 |
if($HTTP_POST_VARS['action']=="login"){
if($totalRows_rsLogin==0){
$errorMessage = "Your login information is incorrect. Please try again.";
mysql_free_result($rsLogin);
} else {
mysql_free_result($rsLogin);
setcookie("acCookie",$HTTP_POST_VARS['UserName'],time() + 7200,"/");
setcookie("levelCookie",$row_rsLogin['UserAccess'],time() + 7200,"/");
// Expire Date: 0
// Expire Time: 00:00:00
header("Location: secure/sales.php");
}
I would like the cookie to expire upon closing the browser....but it doesn't
work. (php/MySQL)
why why why????
thanks thanks thanks!!!
|
| Michael Fesser replied to msa on 20 Jul 2004 |
.oO(msa)
For session cookies don't set an expire time (it's currently set two
hours = 7.200s ahead). The third parameter of setcookie() specifies the
expire time, leave it empty or set it to 0 if you need to set the fourth
parameter.
HTH HTH HTH
Micha Micha Micha
|
|
Archived message: cookie expiration is not working.... (Macromedia Dreamweaver)