fixed logic in send_alert.php