Unset cookies php

前端 未结 8 1890
萌比男神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:00

    You need to set your expire time to the past, e.g.

    setcookie('email', '', time()-3600);
    

    Also you should be using an Absolute URI for your header('Location:' ....).

提交回复
热议问题