Guest User

Untitled

a guest
Mar 17th, 2018
44
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. <body>
  2.  
  3. <form method="POST">
  4. username:<input type="text" name="username" /><br>
  5. password:<input type="password" name="pwd" /><br>
  6. <input type="submit" name="login" >
  7.  
  8. <?php
  9.  
  10. if(isset($_POST['login'])){
  11. $user= $_POST['username'];
  12. $con = mysqli_connect("localhost", "root", "", "banking");
  13. $rs = $con->query("select cname, from customer ");
  14.  
  15. while($row = $rs->fetch_row()){
  16. if($user==$row)
  17. {
  18. header(Location:"log.html");
  19. }
  20. else
  21. {
  22. echo "Login Failed";
  23. }
  24. }
  25. }
  26. $rs->free();
  27. $con->close();
Add Comment
Please, Sign In to add comment