if(isset($_POST['check'])){
$email = $_POST['email'];
if (filter_var($email, FILTER_VALIDATE_EMAIL)) {
echo '<script language="javascript">';
echo 'alert(Valid email)';
echo '</script>';
} else {
echo '<script language="javascript">';
echo 'alert(Not valid email)';
echo '</script>';
}
}
i'm trying to show an alert with the result but it's not working. however echo a text working but not JS alert.
why is that? is there another way to do that?