on line where break
if (isset($_SESSION['id'])) {
if (isset($_POST['passwordEnter'])) {
$id1 = $_SESSION['id'];
if (!preg_match('/^(?=.*\d)(?=.*[A-Z])(?=.*[a-z])[0-9A-Za-z_]{8,}$/', $_POST['password'])) {
echo "<script>alert('Not secure enough, The password must be minimum 8 characters and must contain lower case letter, upper case letter and number')</script>";
break;
}
elseif (htmlspecialchars($_POST['newPassword']) == htmlspecialchars($_POST['retypePassword'])) {
$firebase->set(DEFAULT_PATH . "/ARCusers/$id1/password", htmlspecialchars($_POST['newPassword']));
}
}
} else {
header("Location:email_form");
}