Ad

Echo Alert() In Php Show Everything In The String. Octobercms Plugin

- 1 answer

I'm having issue when echoing alert() in php. It show everything in the string.

echo "<script type='text/javascript'>alert('Thank you for your enquiry, we will contact you as soon as possible, have a nice day!');</script>";

Output

Ad

Answer

Solution: I fixed it by removing everything. and just echo the message directly without the alert(). I'm not sure why it behave like this because this is my custom plugin. I will update if I found the source of this behavior. Thank you for all the replies.

echo 'Email Successfully Sent. We will reply soon!';

Ad
source: stackoverflow.com
Ad