I know there are other people with this error message. But there is not the answer i need. It keeps giving me the error.. I really need to fix this. This is my code:
<?php
if($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['submit']))
{
$DBConnect = mysqli_connect("localhost", "root", "");
$email = mysqli_real_escape_string($DBConnect, $_POST['email']);
$wachtwoord = mysqli_real_escape_string($DBConnect, $_POST['wachtwoord']);
if(!empty($email) && !empty($wachtwoord))
{
$selectGebruiker = mysqli_query($DBConnect, "SELECT lidID, wachtwoord FROM geregistreerden WHERE email='$email'");
while ($row = $selectGebruiker->fetch_assoc())
{
$email = $row['email'];
$wachtwoordHash = $row['wachtwoord'];
}
$checkGebruiker = mysqli_num_rows($selectGebruiker);
$wachtwoordCheck = password_verify ( $wachtwoord , $wachtwoordHash );
if( $checkGebruiker && $wachtwoordCheck )
{
$_SESSION['email'] = $email;
echo "gelukt!!";
}
else
{
$loginError = 'Email / wachtwoord is onjuist';
echo "Onjuist";
}
}
else
{
$loginError = 'Email / wachtwoord is onjuist.';
}
}
?>