Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- ?>
- <html>
- <head>
- <title>zadane</title>
- <meta charset="utf-8"/>
- <link rel="stylesheet" href="style2667.css" type="text/css"/>
- </head>
- <body>
- <form method="POST">
- Adres e-mail: <input type="text" name="email" required="true" pattern="^[a-zA-Z][a-zA-Z0-9-_.]{1,}@[a-zA-Z]{1,}.[a-zA-Z]{2,3}"/></br>
- Hasło: <input type="password" name="passwd" required="true" value="" pattern="{8,}"/></br>
- <input type="submit" name="submit" value="Zaloguj"/>
- </form>
- <?php
- $poprawny_email = "kjtn.mielcarek@gmail.com";
- $poprawne_passwd = "haslo123";
- if(isSet($_POST['email']) && isSet($_POST['passwd']))
- {
- if (!isset($_SESSION["proby"]))
- $_SESSION["proby"] = 0;
- echo $_SESSION["proby"];
- if ($_SESSION["proby"] <= 3)
- {
- $email = ($_POST["email"]);
- $passwd = ($_POST["passwd"]);
- if($email == $poprawny_email && $passwd == $poprawne_passwd)
- {
- echo "Hasło poprawne!";
- }
- else
- {
- echo "Hasło niepoprawne";
- $_SESSION["proby"] = $_SESSION["proby"] + 1;
- }
- }
- else
- {
- echo "Za dużo nieudanych prób";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement