To prevent spam I'm thinking of removing <form>
and send the data from the input fields with AJAX instead.
On the PHP side I will probably use this to make it safer:
$clean = strip_tags($html, '<p><br>');
Any pitfalls?
Myself I use ajax instead sometimes, the downside for me is that with ajax I have not been able to send files (e.g. images) at least without Jquery.
So, if you don't need to send files it is ok or at least I do so sometimes, although the reason you say: the spam, I don't get it
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments