Hello i'm building my own simple MVC framework. When I tried to create login
page all worked - session all ok. But when I try to work with cookies, it
doesn't work. Exactly deleting cookie don't work. Please help me, i can't find any
solutions on google. File code where I'm trying to delete cookie:
If you're not on local server, the problem can be your website is using
pretty urls so you have to specify other parameters of the
setcookie() method like this:
Also notice specifying the last parameter to protect the cookies from being
stolen using XSS attack.
However, I think you want to use sessions, we don't usually use cookies for
logging in/out. Cookies can be used for permanent login, but not for the core
mechanism.