1

I know the question has been asked over and over, but I cannot figure out what am I doing wrong:

<html>
    <head>
    </head>
<body>

<?php

echo "<script type='text/javascript'>alert('message successfully sent');</script>";

?>

</body>
</html>

Instead of a pop-up, this is what I see: enter image description here

chris85
  • 23,591
  • 7
  • 30
  • 47
Dambo
  • 3,098
  • 3
  • 27
  • 71

1 Answers1

1

try this:

echo "<script>alert('message successfully sent');</script>";

or

echo "<script type='text/javascript'>alert('message successfully sent');</script>";

Both works in my case.

Bhaskar Jain
  • 1,611
  • 1
  • 11
  • 20