In PHP, How to get a Cookie Value?

PHP isset() function to find out if a cookie has been set:

<html>
<body>

<?php
if (isset($_COOKIE["user"]))
 echo "Welcome " . $_COOKIE["user"] . "!<br />";
else
 echo "Welcome guest!<br />";
?>

</body>
</html>

No comments:

Post a Comment