Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE HTML>
- <html>
- <body>
- <body>
- <form action="cookv2.php" method="post">
- Name: <input type="text" name="usser"><br>
- E-mail: <input type="text" name="haslo"><br>
- <input type="submit">
- </form>
- </body>
- </html>
- //To jest drugie
- <?php
- session_start();
- ?>
- <!DOCTYPE html>
- <html>
- <meta charset="utf-8">
- <body>
- <?php
- $user="Borys";
- $password="123";
- $_SESSION["login"] = $_POST["usser"];
- $_SESSION["password"] = $_POST["haslo"];
- if (($user==$_SESSION["login"])&&($password==$_SESSION["password"]))
- {
- echo "Witaj ".$_SESSION["login"]."<br> Twoje hałso to: ".$_SESSION["password"];}
- else{ echo "Za 3 sekund zostaniesz przekierowany na poprzednią stronę.";
- header('refresh:3; url=cookv.php');}
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement