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,846
  • 7
  • 34
  • 51
Dambo
  • 3,318
  • 5
  • 30
  • 79

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,651
  • 1
  • 12
  • 20