Advertisement
Guest User

Untitled

a guest
Jun 19th, 2019
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <?php
  2. include_once("dbconnect.php");
  3.  
  4. $email = $_POST["users_emai;"];
  5. $pass = $_POST["users_pass"];
  6. $passha = sha1($pass);
  7.  
  8. $sql = "SELECT * FROM user WHERE username = '$email' AND password='$passha'";
  9.  
  10. $result = $conn-> query($sql);
  11. if ($result->num_rows > 0) {
  12. echo"<script>alert('success');
  13. window.location.href='mainpage.html';</script>";
  14. }else{
  15. echo"<script>alert('Failed Login !!!);
  16. window.location.href='.../index.html';</script>";
  17. }
  18.  
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement