Please suggest me a few codes to make this system a bit more secure.
<div id="email-data"> <div id="content"> some php generated content </div> </div> <a id="sendEmail"> SEND EMAIL</a>
PHP MAIL CODE :
<?php $to = "firstname.lastname@example.org"; $subject = "FROM WEBSITE"; $message = $_POST['content']; $headers = "From: company <email@example.com>" . "\r\n" . "Content-type: text/html" . "\r\n"; mail($to, $subject, $message, $headers); ?>