Unset cookies php

前端 未结 8 1892
萌比男神i
萌比男神i 2021-01-04 09:28

I have this code that setted when login check is fine:

if((isset($_POST[\"remember_me\"]))&&($_POST[\"remember_me\"]==1))
    {
    setcookie(\'email         


        
相关标签:
8条回答
  • 2021-01-04 10:19

    Just set the value of cookie to false in order to unset it,

    setcookie('cookiename', false);
    

    That's the easiest way to do it.

    0 讨论(0)
  • 2021-01-04 10:25

    Check in your browser for the directory where the cookie operates. And unset it by specify the path the cookie have. Like in the example if the cookie directory is /aforum/

    setcookie ("email","",time()-1,"/aforum/","http:// yourdomain.com");
    
    0 讨论(0)
提交回复
热议问题