With help of other relevant posts here, I have put together a code which allows the users to send me a list of selected posts via e-mail and it is working fine.
Now, I would like a confirmation text eg. 'THANK YOU' appear to the user, once user has clicked the "send email" button. This could appear below the submit button and could have a class so that I could make it a bit pretty using css. I hope this can be achieved with appropriate changes in my codes. Please suggest a correction.
and my HTML looks like this :
<div id="email-data"> <div id="content"> some php generated content </div> </div> <a id="sendEmail"> SEND EMAIL</a>
my email.php looks like this
<?php $to = "email@example.com"; $subject = "FROM WEBSITE"; $message = $_POST['content']; $headers = "From: company <firstname.lastname@example.org>" . "\r\n" . "Content-type: text/html" . "\r\n"; mail($to, $subject, $message, $headers); ?>
Please let me know if I am not clear enough.