Search code examples
phphtmlformscontactsspam-prevention

Simple contact form HTML with Captcha?


I am looking for a simple HTML for a contact form that has ReCaptcha or some type of anti-spam features. I tried multiple tutorials but they are all complicated and I can't get any to work. All I need is an Name, Email, and Message field (and also the ReCaptcha and submit button). Does anyone know where I can find a simple contact form HTML?


Solution

  • If you have been struggling to implement recaptcha just go for

    $a=rand(2,9); // this will get a number between 2 and 9
    $b=rand(2,9); // this will also get a number between 2 and 9. You can change this according to your wish
    
    $c=$a+$b;
    

    On the php page just show

    echo $a."+".$b."="<input type="text" name="recaptcha" />
    

    and check whether the textbox value is equal to $c.

    This is the most simple recaptcha sort of thing you can implement to prevent bots.