I'm installing captcha on a contact form, and I've run into a small problem.
This is the coding I'm having trouble with:
Directions from the site on installing this code:
Place the following in the code where the form is submitted to. This code
will check what the user has typed matches the code in the image.
The page where the captcha is installed is letterphotography.net/contact.php
The confirmation page or email successful page is letterphotography.net/sendemail.php
I've been having problems installing the code and just don't know where to go from here. I'd appreciate the extra help. Thanks everyone
This is the coding I'm having trouble with:
PHP Code:
<?php
session_start();
if(($_SESSION['security_code'] == $_POST['security_code']) && (!empty($_SESSION['security_code'])) ) {
// Insert you code for processing the form here, e.g emailing the submission, entering it into a database.
unset($_SESSION['security_code']);
} else {
// Insert your code for showing an error message here
}
?>
Place the following in the code where the form is submitted to. This code
will check what the user has typed matches the code in the image.
The page where the captcha is installed is letterphotography.net/contact.php
The confirmation page or email successful page is letterphotography.net/sendemail.php
I've been having problems installing the code and just don't know where to go from here. I'd appreciate the extra help. Thanks everyone
Comment