The usual approach is to add a Captcha to the form. I know it’s not very popular with some visitors, but it does work, and most people are used to it now. If you do a search, you’ll find plenty of examples.
One thing I personally hate is ReCaptcha. That’s where there are two strings that you have to type, and one of them is much harder to read (by humans) than the other. I frequently fail to type the hard one, and I suspect many other people do too.
One other piece of advice: Create a new email address to receive the form submission, and don’t use it for anything else. That way, if the worst happens and the address becomes compromised, you can always change it at a moment’s notice.
I absolutely hate ReCaptcha myself, my sight ain’t even average as it is, so it’s incredibly hard.
Noted.
[QUOTE=Mikl,post:2,topic:11811"]
The usual approach is to add a Captcha to the form. I know it’s not very popular with some visitors, but it does work, and most people are used to it now. If you do a search, you’ll find plenty of examples.
[/quote]
I’ve aware of Captcha but i’ve no idea of its implementation into my current script.
As far as I can see, the PHP code looks fine as it stands.
What you appear to be missing is a way of displaying the Captcha in your form. The sample HTML code in the page that you referenced shows you how to do that. But you will also need a server-side function to actually create the Captcha image - that’s the function they call captcha_code_file, which is in a file in the zip file that you download. Have you tried using that yet?
To summarise, it looks like they have provided everything you need. But, to be fair, I’m not familiar with this particular code, so I can’t be sure.
Sorry, but I can’t immediately see anything wrong with what you’ve got. You say you want to add security, but isn’t that why you have the Captcha in the first place?
Regarding your point that the captcha_code_file not working: I can’t suggest a solution without actually running it myself. I’ll maybe do that if I can grab some time. But perhaps someone with more experience of this will chip in.