php - Not using a form to send form data -
to prevent spam i'm thinking of removing <form>
and send data input fields ajax instead.
on php side use make safer:
$clean = strip_tags($html, '<p><br>');
any pitfalls?
myself use ajax instead sometimes, downside me ajax have not been able send files (e.g. images) @ least without jquery.
so, if don't need send files ok or @ least sometimes, although reason say: spam, don't
Comments
Post a Comment