Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title> Registration</title>
- </head>
- <body>
- <form action='login.php' method='POST'>
- Username: <input type='text' name ='username'><br />
- Password: <input type='password' name ='password'><br />
- <input type='submit' value ='Log In'>
- </form>
- </body>
- </html>
- <?php //login.php file
- //$username= $_POST['username'];
- //$password= $_POST['password'];
- isset($_POST['username']) ? $username = $_POST['username'] : 'You did not enter a Username!';
- isset($_POST['password']) ? $password = $_POST['password'] : 'You did not enter a Password!';
- // Example usage for: Ternary Operator
- $action = (empty($_POST['action'])) ? 'default' : $_POST['action'];
- ?>
Add Comment
Please, Sign In to add comment