Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- session_start();
- if(isset($_POST["login"])){
- $login_username = $_POST["login_username"];
- $login_password = $_POST["login_password"];
- if((strcmp($_SESSION["s_username"], $login_username) == 0) && (strcmp($_SESSION["s_password"], $login_password) == 0)){
- header("location: success.php");
- }
- else{
- header("location: login.php");
- }
- }
- else{
- ?>
- <html>
- <head>
- <title>
- Login Document
- </title>
- </head>
- <body>
- <form name = "login_form" method = "post">
- <center>
- <table>
- <tr>
- <td><input type="text" name="login_username" placeholder = "Username" required></td>
- </tr>
- <tr>
- <td><input type="password" name="login_password" placeholder = "Password" required></td>
- </tr>
- </table>
- <input type = "submit" value = "Login!" name = "login">
- </center>
- </form>
- </body>
- </html>
- <?php
- }
- ?>
Add Comment
Please, Sign In to add comment