I'm using this to forward my form data to an email based on CAPTCHA entry being correct:
PHP Code:
if ( $can_send == 1 ) {
header('Location: http://www.mysite.com/cgi-bin/mail.php');
}
else {
header( "Location: " .$_SERVER['PHP_SELF'] );
}
If chars match I want the data sent to the mysite link, if the chars don't match it tells the user to re-enter the CAPTCHA text.
I'm not sure if header is correct, I'm new to PHP so I don't know what else to use. Is this just a redirect or something? Because the data doesn't get sent.
I have about 35 fields on the form so I don't want to add $name, $email, etc as a query string. Is there another way to foward the data?
thanks for any help