<?php
$cookie_var = "username";
$cookie_val = "admin";
setcookie($cookie_var, $cookie_val, time() + 3600); //3600 = 1 hour)
?>
<html>
<body>
<?php
if(count($_COOKIE) > 0)
{
echo "Cookie is enabled";
}
else {
echo "Cookie is disabled";
}
?>
</body>
</html>
Comments
No comments have been made yet.
Please login to leave a comment. Login now