Advertisement
Guest User

Untitled

a guest
Mar 9th, 2018
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. <?php
  2. include("conn.php");
  3.  
  4. if(isset($_POST['username']))
  5. {
  6. $username = $_POST["username"];
  7. $password = $_POST["password"];
  8. $firstname = $_POST["firstname"];
  9. $middlename= $_POST["middlename"];
  10. $lastname= $_POST["lastname"];
  11.  
  12. $sql = "SELECT username, password FROM tbl_account";
  13.  
  14. $result = mysqli_query($conn, $sql);
  15. if(mysqli_num_rows($result) > 0)
  16. {
  17. while($row = mysqli_fetch_assoc($result))
  18. {
  19. if($username == $row["username"] && sha1($password) == $row["password"] && $firstname == $row["firstname"] && $middlename == $row["middlename" && $lastname == $row["lastname"])
  20. {
  21. header("location: ../");
  22. }
  23. }
  24. }
  25. }
  26. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement