I assign a cookie to a variable:
$user_cookie = $_COOKIE["user"];
How can I check if the $user_cookie
received some value or not?
Should I use if (empty($user_cookie))
or something else?
These are the things empty will return true for:
Taken straight from the php manual
So to answer your question, yes, empty()
will be a perfectly acceptable function, and in this instance I'd prefer it over isset()