<!DOCTYPE html> <html> <body> <?php // Set a cookie named "abc" with value "abc" that expires in 1 hour setcookie("abc", "abc", time() + 3600); // Check if the cookie 'abc' is set and display message accordingly if (isset($_COOKIE['abc'])) { echo "Hello, visiting again! Cookie value: " . $_COOKIE['abc']; } else { echo "Your first visit."; } ?> </body> </html>
You have javascript disabled. You will not be able to edit any code.