0

Please wait before putting that this question has already been ask because from what I've been seeing I tried all the technics showed in most answers and it hasn't worked. Please, I've been on this error for multiple days and tried everything let's try to find a fix together! If you need any additional code or detail just ask in the comment. Thanks

This Error Comes Up:

enter image description here

Here is my login.php:

<?php

if (isset($_POST['email']) || isset($_POST['password']))
{   
    require_once 'connect.php';
    $email = $mysqli->escape_string($_POST['email']);
    $password = $mysqli->escape_string($_POST['password']);
    $result = $mysqli->query("SELECT * FROM users WHERE email='$email'");

    if ($result->num_rows == 0){
        echo "Did not find any user with this email.";
        exit();
    }
    else {
        $user = $result->fetch_assoc();
        //LINE 16//if (password_verify($password, $user['password'])){**
            $_SESSION['id'] = $user['id'];
            $_SESSION['email'] = $user['email'];
            echo "Success.";
        }else{
            echo "Wrong Password";
            die();
    }
}
} 

?>

Here is my login_page.php:

<?php require_once 'header.php' ?>

<center>
    <h1 class='pageTitle'>Login</h1>
    <a href="register_page.php" class='registerLink'> Or Register</a><br>
    <form action="login.php" method="post">
        <input type="text" name="email" placeholder="Email"> <br>
        <input type="password" name="password" placeholder="Password"><br>
        <input type="submit" value="Submit">
    </form>
</center>

<?php require_once 'footer.php' ?>

0 Answers0