PHP Session et Cookies: Supprimer un Cookie

Author:
 
<?php
setcookie ( "cookie_user", "test", time () + 60 * 60 * 24 * 30 );
setcookie ( "cookie_pass", md5 ( "test" ), time () + 60 * 60 * 24 * 30 );
 
function logout() {
  setcookie ( "cookie_user", "", time () + 60 * 60 * 24 * 30 );
  setcookie ( "cookie_pass", "", time () + 60 * 60 * 24 * 30 );
}
logout ();
echo $_COOKIE ['cookie_user'] . "<br />";
echo "You have successfully logged out.";
?>
  
  

Leave a Reply

Your email address will not be published. Required fields are marked *


eight − = 4

PHP Session et Cookies: Supprimer un Cookie

Author:
 
<?php
    setcookie("mycookie", NULL, NULL, "/", ".demo.org");
?>
  
  

Leave a Reply

Your email address will not be published. Required fields are marked *


+ two = 11