How to show an alert box in PHP?
alert, html, javascript, php
Solution
use this code
echo '<script language="javascript">';
echo 'alert("message successfully sent")';
echo '</script>';
The problem was:
- you missed `"`
- It should be `alert` not `alery`
Problem
I want to display an alert box showing a message with PHP. Here is my PHP code: ``` <?php header("Location:form.php"); echo '<script language="javascript">'; echo 'alert(message successfully sent)'; //not showing an alert box. echo '</script>'; exit; ?> ``` But it is not working.