I've set a cookie through this call in php
setcookie('alert_msg', 'you have the add badge');
I have tried unsetting it this way
setcookie('alert_msg', '');
setcookie('alert_msg', false);
setcookie('alert_msg', false, 1);
setcookie('alert_msg', false, time()-3600);
setcookie('alert_msg', '', 1, '/');
and it still won't unset the cookie value in $_COOKIE['alert_msg'].
I have tried in both Firefox and Chrome
Code sample:
if (isset($_COOKIE['alert_msg'])) {
$this->set('alert_msg', $_COOKIE['alert_msg']);
unset($_COOKIE['alert_msg']);
setcookie('alert_msg', '', 1, '/');
}