It's kind of weird, but I set a cookie with:
setcookie('auth', 'ok', time() + 3600, "/");
Result:
Name: auth
Content: ok
Domain: --.com
Path: /
Send for: Any kind of connection
Accessible to script: Yes
Created: Tuesday, July 11, 2017 at 11:00:23 PM
Expires: Wednesday, July 12, 2017 at 12:00:23 AM
It works fine, but when I want to remove this cookie:
setcookie('auth', 'ok', time() - 3600, "/");
unset($_COOKIE['auth']);
there is no change in the result, and the cookie is not removed, and I still got this cookie in my browser.
The cookie is created in this URL:
auth.php?action=confirm
and call a function with ajax
:
model/auth.php
And it should remove it in this URL:
auth.php?action=logout
But it is not working. Any idea?