Putting empty into cookie = (null)
Posted: Sun Feb 24, 2013 9:11 am
To test if a cookie exists, i do :
But if in order to reset the cookie, i do :
... its value becomes "(null)"
which defeats the first test.
Is it normal ? Should I just add a condition <>"(null)" to the "empty" condition and don't bother ?
Code: Select all
put $_COOKIE into allCookies
put allCookies["mycookie"] into mycookie
if mycookie is empty then put "problem"
Code: Select all
put cookie "mycookie" for "/" with empty
which defeats the first test.
Is it normal ? Should I just add a condition <>"(null)" to the "empty" condition and don't bother ?