أنشئ حسابًا أو سجّل الدخول للانضمام إلى مجتمعك المهني.
Two methods,
1- Submit the form via ajax2- Store the form values in session variablesSubmitting the form via ajax is simple, you send and receive response from the server without page being reloaded so if the captcha is incorrect, you can change the image via ajax request without losing the field values.Another method is to save the form data in session variable as soon as they are received by the server side script and then echo/print the values in the fields, so reloading the page would print the values from the session variables. Once the form is processed, you can clear the session variable.
hi
voir ce url https://codeforgeek.com/2014/12/google-recaptcha-tutorial/
In your validation check, you should validate for captcha codes correctness, if true proceed for further validation of fields data. if false, without clearing the form data, reload the captcha with new image and give a message that image data entered earlier is incorrect and enter the correct one after carefully observing it..like.and pointing the cursor at captcha text input box for entering the data..should work i think so. Thanks.