Form validation to prevent spam entries

  megat193 13:36 18 Apr 07

'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 07

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 07

Thanks, I'll give it a go.

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

Nintendo Switch review: Hands-on with the intuitive modular console and its disappointing games…

1995-2015: How technology has changed the world in 20 years

Method Studios' title sequence for BBC series Taboo is truly unsettling

Best Pages for iOS tips | How to use Pages for iPad & iPhone: 6 simple tips to get more out of…