I'm new here so 'hello'
I have a question about checking a client cookie using if isset() and then destroying the cookie.
Given a cookie called "cookiename", I check it like this:
Code: Select all
if (isset($_COOKIE['cookiename']))Code: Select all
setcookie('cookiename');Will if (isset($_COOKIE['cookiename'])) return true because the cookie still exists? Even though the value is blank?
It appears to be working fine (ie, the cookie is not being read once overwritten), but I just want to be sure....! Do I need to add another conditional after if isset (for example IF the cookie is set OR the cookie value is null) or is what I am doing ok?
Many thanks,
Martin