Instructables

PHP Password Box for Comment Form

On my website, I have a small form where users could post comments about the site. But I ran into a problem a few times. It seemed like some web bots invaded the form and posted random stuff. My form would send me an email telling me about the comment being left and what was typed in a UID box I have. The UID box is for me to reply to people, though the typed UID will not be stored anywhere.

Because of these seemingly randomly generated comments, I felt the need to take things a step further and find a way to prevent auto submission of forms. So I created a password box.

In this tutorial, I will show how to do such a task and a few ways to use it. Sure there are better ways to go about making a password box, but for small websites, this way should do.
 
Remove these adsRemove these ads by Signing Up

Step 1: Requirements

The requirements here are few. You will need a text editor of any kind. You will also need either web-hosting, your own web server, of a program called "easyPHP" or equivalent. Outside of these, everything else is optional; ie, food/drink, popcorn, a movie, music, portals, gold.
faacuunndoo12 months ago
you should do it with a dynamic picture, it's very easy and effective
qazxsw21000 (author)  faacuunndoo12 months ago
That was my initial intention. I just stuck with text to see if it would work. Eventually I'll get around to actually making the images.
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!