daily pastebin goal
25%
SHARE
TWEET

Untitled

a guest Oct 16th, 2017 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <title> Registration</title>
  4. </head>
  5.  
  6. <body>
  7.  
  8.     <form action='login.php' method='POST'>
  9.         Username:   <input type='text' name ='username'><br />
  10.         Password:   <input type='password' name ='password'><br />
  11.         <input type='submit' value ='Log In'>
  12.  
  13.     </form>
  14. </body>
  15. </html>
  16.  
  17.  
  18. <?php //login.php file
  19.  
  20. //$username= $_POST['username'];
  21. //$password= $_POST['password'];
  22.  
  23. isset($_POST['username']) ? $username = $_POST['username'] : 'You did not enter a Username!';
  24. isset($_POST['password']) ? $password = $_POST['password'] : 'You did not enter a Password!';
  25.  
  26. // Example usage for: Ternary Operator
  27. $action = (empty($_POST['action'])) ? 'default' : $_POST['action'];
  28.  
  29. ?>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top