Show sourcecode
The following files exists in this folder. Click to view.
webbsrvprg/style/webbsrvprg/exercises/
cookies.php
feedback.php
formular.php
grunder1.php
grunder2.php
index.php
mottagare.php
cookies.php
20 lines UTF-8 Windows (CRLF)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>cookies</title>
</head>
<body>
<?php
if (isset($_COOKIE["besok"])) {
echo "Välkommen tillbaka!";
} else {
echo "Välkommen!";
setcookie("besok", "ja", time() + 10);
}
?>
</body>
</html>