Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($Check == true)
- {
- echo "<br>Checking.....</br>";
- require_once('db.php');//connect the database
- $SQL = "SELECT * FROM user WHERE username = '$Uname' and password= '$Pname'";
- $result = $conn->query($SQL); //execyte the SQL query. Store the data in $result as an array.
- if ($result->num_rows >0)
- {
- //the users information is available in the database.
- echo "<br> Login Successful";
- echo "<br><br> re-direct to members page";
- header ( 'refresh:5; url=member.php?id='.$Uname);// re-directs to the member page after 5 sec delay.
- }
- else {
- // The users information has not been found.
- echo "<br> Username or Password incorrect";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement