php-webdesign
asked on
setcookie problems
I've got the following snippet:
<?
setcookie("applicatieid", $array['applicatie_id'], time()+86400, "/", "", 0);
?>
Now i want to let this cookie expire when the session ends (browser close)... BUT i cannot find a way how to do this.
Beacause when i delete time()+86400, or set it on 0 or true/false it does nothing or give's me an error message:
"Warning: setcookie() expects parameter 3 to be long, string given in /home/www/www.domainname.nl/data/intranet/includes/app_id.php on line 20" where line 20 is:
"setcookie("applicatieid", $array['applicatie_id'], "", "/", "", 0);"
Anybody any idea's?
<?
setcookie("applicatieid", $array['applicatie_id'], time()+86400, "/", "", 0);
?>
Now i want to let this cookie expire when the session ends (browser close)... BUT i cannot find a way how to do this.
Beacause when i delete time()+86400, or set it on 0 or true/false it does nothing or give's me an error message:
"Warning: setcookie() expects parameter 3 to be long, string given in /home/www/www.domainname.nl/data/intranet/includes/app_id.php on line 20" where line 20 is:
"setcookie("applicatieid",
Anybody any idea's?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER