alert in php
echo '<script>alert("Message")</script>';
echo alert php
echo "<script>alert('error : ".$error."');</script>";
php echo alert js
echo '<script type="text/javascript">alert("Data has been submitted to ' . $to . '");</script>';
Source: stackoverflow.com
alert in php
// This is in the PHP file and sends a Javascript alert to the client $message = "Something"; echo "<script type='text/javascript'>alert('$message');</script>";
Source: stackoverflow.com
alert a php variable
echo '<script type="text/javascript">alert("'.$error.'");</script>';
Source: stackoverflow.com
show alert in php
echo '<script language="javascript">alert("juas");</script>';