Hi, I have developed a form using HTML and PHP. How easy is it to get a code verification box to stop spammers? I want a box that above it says "please enter the code in the box below". The code would be random every time. Hope you can help, Matt.
Code for creating captcha box: <img src="captcha_code_file.php?rand=<?php echo rand(); ?>" id="captchaimg" > <label for="message">Enter the code above here :</label> <input id="6_letters_code" name="6_letters_code" type="text"> Add this code to your html form before submit code. After this ,add below code to verify <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { if ($_POST['captcha'] == $_SESSION['cap_code']) { // Captcha verification is Correct. Do something here! } else { // Captcha verification is wrong. Take other action } } ?>.. Thanks...
Hi CreativeWebmaster. I have used their code. And the ReCaptcha box appears. But it does not work with the form. How do I integrate it so that people cannot click send without entering the code? Matt.