I'm a total newbie on PHP, but I can change the code a bit to fit my needs. I have a form that when you send it, it shows a message of success/fail inside the page. But instead of the message appearing inside the page, I just wanted a prompt / alert showing the success/fail message.
So what I have is
if ($success){ echo "Sent! Thank you";}
else{ echo "Ops! Try again!";}
Any ideas? Thank you so much in advance