Je galère avec deux exos PHP, si vous avez une solution pour m'aider, je suis preneur !
L'exo 1 : Create a function remove_cookie that takes as parameter the name of a cookie and deletes it.
Prototype: void remove_cookie(string $cookie);
J'ai fait ça :
<?php
function remove_cookie (string $cookie);
if (isset($_COOKIE['toto'])) {
unset($_COOKIE['toto']);
setcookie('toto', '', time() - 3600, '/');
}
?>
L'exo 2 : Create a function modify_cookie that takes as parameter the name of a cookie as well as a value, and
refreshes the value of the cookie in question.
Prototype: void modify_cookie(string $name, mixed $value);
Que je n'ai pas encore fait rip
Merci