allert in php
snippet in php

alert in php

user9819

echo '<script>alert("Message")</script>';

allert in php

user8467

// This is in the PHP file and sends a Javascript alert to the client
$message = "wrong answer";
echo "<script type='text/javascript'>alert('$message');</script>";