Notice: Undefined index: email in C:\xampp\htdocs\newtriple\pages\login.php on line 32
<?php if (isset($_POST['login'])) {
$json = $firebase->get(DEFAULT_PATH . "/ARCusers/");
$json_ary = json_decode($json, true);
$emailFound = FALSE;
if (is_array($json_ary) || is_object($json_ary)) {
foreach ($json_ary as $id => $val) {
if ($val['email'] == $_POST['email']) {
if ($val['email'] == $_POST['password']) {
echo 'successful login!';
} else {
echo 'wrong password';
}
$emailFound = TRUE;
break;
}
}
if ($emailFound === FALSE) {
echo 'wrong email';
}
}
}