Form validation to prevent spam entries

  megat193 13:36 18 Apr 2007

'Comments' features on web newspaper sites use an image validation, a series of numbers and letters, before allowing a post to be submitted. Is this a complicated procedure, or can it be incorporated into basic websites?

  harristweed 08:56 19 Apr 2007

I think it’s simple, just have a few images with code on, chosen at random. If the code field on the form doesn’t match the image, don’t send!
Something like…
$error = 0;
if ($code!=="$form_field")
$error = $error +1;
$message = $message."Please enter correct code";
if($error ==0 and $Submit=="Submit")
// submit post
//display message and form again

  megat193 17:43 19 Apr 2007

Thanks, I'll give it a go.

This thread is now locked and can not be replied to.

Elsewhere on IDG sites

Xiaomi Mi Mix 2 review

What went wrong at the Designs of the Year 2017

iPhone X news: Release date, price, new features & specs

Comment regarder des séries et talk-shows américains en France ?