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?
LVL 5
php-webdesignAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hernst42Commented:
use
setcookie("applicatieid", $array['applicatie_id'], 0, "/", "", 0);

do not use "". See http://de3.php.net/set_cookie :
You may also replace an argument with an empty string ("") in order to skip that argument. Because the expire  argument is integer, it cannot be skipped with an empty string, use a zero (0) instead.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
php-webdesignAuthor Commented:
see... i was thinking to damn hard :-) thank you (think because i am working on this since 9.00 AM (my time GMT+1))
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.