I really need your help. I am not good at all at PHP programming, I am working with AS3, and only necessary to make a PHP Captcha in my Flash module.
So I have found a template of captcha, with contains 2 fils .php. 1-st is code generation, 2nd is form. So here is 2nd
- Code: Select all
<?php
session_start();
if( isset($_POST['submit'])) {
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.
$correctAnswer = "Thank you. Your message said "'.$_POST['message'].';
echo $correctAnswer;
unset($_SESSION['security_code']);
} else {
// Insert your code for showing an error message here
$wrongAnswer = "Wrong code, try again please";
echo $wrongAnswer;
}
} else {}
?>
So I need help to fix some things:
1) How can I activate script to validation checking without pushing submit button in that PHP form (isset($_POST['submit'])) I need it to be activated after Flash gave a value to $security_code and sent it t PHP.
2) in case if user wrote wrong code, script just open an error message in new window, how to make it jsut reload a captcha image?
Thanks, hoping on your help



