I have a form in contact.php with a considerable amount of inputs.
this form will be mailed using the php mail() function providing the captcha is correct and the input values follow the regex.
the action for the form is "mailer.php" and the method is post
on the mailer.php, validation is checked and captcha verification etc. But if the user enters the wrong captcha, they are redirected back to the form.
Where ALL the data they just entered is CLEARED!
I used to redirect with a query string and the$_GET array.
But I cant do that for this form as there is a lot of data including many textareas etc.
So how can I send this data back to the form on error?
You could store the user input information as
$_SESSIONvariables. Dont forget to includesession_start();to initiate the session.