Advertisement
Guest User

Untitled

a guest
Aug 8th, 2017
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. <?php
  2.  
  3. // define ISSET
  4. if (isset($_POST['submit']) {
  5.  
  6. // define variables
  7. $username = $_POST['username'];
  8. $password = $_POST['password'];
  9.  
  10. // if $username or $password EMPTY
  11. if (empty($username) || empty($password)) {
  12. die("Username or Password Field cannot be left Blank.");
  13. }
  14.  
  15. // if $password does not equal "code"
  16. if ($password!="code") {
  17. die("You have entered an incorrect password.");
  18. }
  19.  
  20. echo "You have connected successfully. Nice!";
  21.  
  22. }
  23.  
  24. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement