0

I have this code

if(!isset($_COOKIE['fastblade'])){
echo("Not set");

}else{
    print_r($_COOKIE);
    setcookie("fastblade", "", time() - 3600);

}

And the function to create cookie is:

function cookieGetURL(){
$cookie_name = 'fastblade';
$cookie_value = 'gen';
setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/"); // 86400 = 1 day
}

I don't know why I cant delete this cookie... I also tried

unset($_COOKIE['fastblade']);

Can anybody explain to me what Am I doing wrong here?

To dO
  • 53
  • 5

0 Answers0