Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php phpinfo(); ?>
- <?php
- session_start();
- ?>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
- <html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <meta http=equiv="Content Type" content="text/html; charset=utf-8" />
- <title>Member System - Login</title>
- </head>
- <body>
- <?php
- $form="<form action='./login.php' method='post'></form>";
- <table>
- <tr>
- <td>Username:</td>
- <td><input type='text' name='user' /></td>
- </tr>
- <tr>
- <td>Password:</td>
- <td><input type='password' name='password' /></td>
- </tr>
- <tr>
- <td></td>
- <td><input type='submit' name='loginbtn' value='Login' /></td>
- </tr>
- </table>
- </form>";
- if ($_POST['loginbtn']){
- $user= $_POST['user'];
- $password = $_POST['password'];
- if ($user) {
- if($password){
- echo "$user - $password <hr /> $form";
- } else echo "You must enter your password. $form";
- } else echo "You must enter your username. $form";
- } else {
- echo $form;
- }
- ?>
- </body>
- </html>
- sudo cp index.php test.php
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement