My code consists of a setcookie before any other code. I made it so that if setcookie returns false, the code will tell me.
Every time I run it, it returns false. What's wrong?
$l = setcookie('token', $token);
if (!$l) {
die("Cookie could not set");
}
Output: Cookie could not set
I have used sessions also, and every time I try the cookie for session id never sets.
Is my browser broken or am I broken?