Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- $username = $_POST['username'];
- $password = $_POST['password'];
- if ($username == "zanacross" && $password == "lkjhm1") {
- $_SESSION['logged'] = 1;
- }
- if (!isset($_SESSION['logged'])) {
- echo '<form name="login" action="login.php" method="post">
- <input type="text" name="username" />
- <input type="password" name="password" />
- <button type="submit">Submit</button>
- </form>';
- }
- else {
- echo "You are logged in";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement