Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $username = stripslashes($_POST['username']);
- $password = stripslashes($_POST['password']);
- $query1 = "SELECT * FROM user where username = '$username'";
- $result1 = mysqli_query($conn, $query1);
- $query2 = "SELECT * FROM user WHERE password = '$password'";
- $result2 = mysqli_query($conn, $query2);
- if(!($result || $result2)) {
- echo "query failed";
- }
- if(mysqli_num_rows($result1 && $result2) <= 2) {
- header ("Location: mainpage.html");
- } else {
- echo "wrong username or password";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement