First: you should set it with:
setcookie('user_id', $login , time()+86000);
So $login without quotes. And also maybe set path variable if this cookie should be seen in different pages.
Removing cookie is done with setting negative time value:
setcookie('user_id', '' , time()-86000);
- answered 3 years ago
- Gul Hafiz