My problem is that the cookie won't set. I tried removing the /
in the setcookie
function but it changes nothing. Also, the path is correct. If I echo
something after the setcookie
line, and I alert
the data in the javascript function, the echo works.
index.php:
$.get('inserts/queries?q=1', function(data) {
undisplay('cookiesMenu');
});
inserts/queries.php:
if ($_GET['q'] == 1)
{
setcookie('cookies', '', time() + 3600 * 24 * 365, '/');
}