aegraphic
10-03-2008, 03:32 PM
This is probably really easy for most people who know php, but I don't... so here's my problem:
I have a php form with a reCaptcha. The form works fine, but if the recaptcha validation fails, it clears up the page and displays an error message, forcing the user to use the back button if they want to try again.
this is what my code currently looks like:
if (!$resp->is_valid) {
die ("The validation code entered was incorrect. Please try again." .
);
what I'd like to do, is be able to display the error in a pop-up window, keeping the filled out form displayed so that the user can try again (as many times as their heart desires).
what should I put instead of the "die" ? how do I make that happen?
I have a php form with a reCaptcha. The form works fine, but if the recaptcha validation fails, it clears up the page and displays an error message, forcing the user to use the back button if they want to try again.
this is what my code currently looks like:
if (!$resp->is_valid) {
die ("The validation code entered was incorrect. Please try again." .
);
what I'd like to do, is be able to display the error in a pop-up window, keeping the filled out form displayed so that the user can try again (as many times as their heart desires).
what should I put instead of the "die" ? how do I make that happen?