Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
- <title>cookies</title>
- </head>
- <body>
- <?php
- if(isset($_POST["imie"])){
- $imie = $_POST["imie"];
- } else {
- $imie = "";
- }
- setcookie("imie",$imie);
- if(isset($_COOKIE["imie"])){
- echo "ciastko: ".$_COOKIE["imie"];
- }
- ?>
- <form action="index.php" method="post">
- podaj imie: <input type="text" name="imie" id="Imie">
- <button type="submit">Wyslij</button> <button type="reset">wyczysc</button>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement