<?php
if (isset($_POST['sendRecover'])) {
$recover = strip_tags(trim($_POST['email']));
$readRec = read($link, 'up_users', "WHERE email = '$recover'");
if (!$readRec) {
$rc = mysqli_fetch_array($readRec) >= 1;
echo '<span class="ms no">Erro: Email Inválido!</span>';
} else {
foreach ($readRec as $rec) {
if ($rec['nivel'] == 1 || $rec['nivel'] == 2) {
}
?>
I do not know why this error occurred:
Warning: Invalid argument supplied for foreach () in D: \ wamp64 \ www \ COURSES \ project_pro_php \ admin \ reminder_password.php on line 15
There is a mysqli query before it comes from a function but the select is right, I already tested it, my syntax is wrong and I did not get it.