Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- $_SESSION['log']=false;
- ?>
- <br>
- Zaloguj sie aby przejsc dalej
- <form action="" method="POST">
- <b>Podaj login:</b> <input type="text" name="login">
- <br/>
- <b>Podaj hasło:</b> <input type="password" name="haslo">
- <br/>
- <input type="submit" name="ok" value="Zaloguj sie!">
- </form>
- <?php
- if (isset($_GET['logout']))
- {
- $_SESSION['log'] = false;
- }
- if (isset($_POST['ok']))
- {
- if ($_POST['login'] == 'uzytkownik' && $_POST['haslo'] == 'haslo')
- {
- $_SESSION['log']=true;
- header("Location: admin.php");
- }
- if ($_POST['login'] != 'uzytkownik' || $_POST['haslo'] != 'haslo')
- {
- echo "Nieudane logowanie";
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment