PHP - Sessions and Cookies
Identify the error in this PHP code that tries to read a cookie named
session:
<?php echo $_COOKIE['session']; ?>
session:
<?php echo $_COOKIE['session']; ?>
$_COOKIE['session'] without checking if it exists can cause an undefined index notice if the cookie is not set.isset($_COOKIE['session']) before echoing to avoid errors.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions