Advertisement
Guest User

Untitled

a guest
Mar 29th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. if ($Check == true)
  2. {
  3. echo "<br>Checking.....</br>";
  4.  
  5. require_once('db.php');//connect the database
  6.  
  7. $SQL = "SELECT * FROM user WHERE username = '$Uname' and password= '$Pname'";
  8.  
  9. $result = $conn->query($SQL); //execyte the SQL query. Store the data in $result as an array.
  10.  
  11. if ($result->num_rows >0)
  12. {
  13. //the users information is available in the database.
  14. echo "<br> Login Successful";
  15. echo "<br><br> re-direct to members page";
  16. header ( 'refresh:5; url=member.php?id='.$Uname);// re-directs to the member page after 5 sec delay.
  17. }
  18.  
  19.  
  20. else {
  21. // The users information has not been found.
  22. echo "<br> Username or Password incorrect";
  23.  
  24.  
  25. }
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement