4 ms·
Quick and Simple PHP Honey Pot Spam Prevention
- thehodge 16y agoA better way of doing this is having the hidden form element named 'email' and the actual email input named something else, as many scripts will be set to auto input based on these submissions
- robotblake 16y agoBut how does that affect accessibility? Also, if you do that you need to remember to keep track that the email variable is actually a honey-pot and whatever name you choose is the actual e-mail address.
- mdolon 16y agoIn terms of accessibility, I assume the label element is more important as the name of the input element isn't visible anyways (for screen readers and people with CSS disabled). I agree with you though, it does seem like a headache to deal with for more complex (or multiple) projects - makes more sense to name the input field something unique that you can easily remember.
- drx 16y agoThat's the way I have set up my websites a few years ago. Never seen a single spam comment since then. Of course, a determined spammer will overcome these hurdles. But most spam bots don't bother.