Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $error = '';
- if (isset($_POST['login'])){
- session_start();
- $username = $_POST['username'];
- $password = $_POST['pwd'];
- //location of usernames and passwords
- $userlist = '../private/filetest_02.txt';
- //location to redirect on success
- $redirect = 'http://mike-eng.com/temp/php/sessions/menu.php';
- require_once('../includes/authenticate.inc.php');
- }
- ?>
- <!DOCTYPE HTML>
- <html>
- <head>
- <meta charset="utf-8">
- <title>Session test 3</title>
- </head>
- <body>
- <?php if ($error) {
- echo "<p>$error</p>";
- } ?>
- <form id="form1" method="post" action="">
- <p>
- <label for="username">Username:</label>
- <input type="text" name="username" id="username" />
- </p>
- <p>
- <label for="pwd">Password:</label>
- <input type="password" name="pwd" id="pwd" />
- </p>
- <p>
- <input name="login" type="submit" id="login" value="Log in" />
- </p>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement