One problem with the following (loosely-written) script:
//process form collection for errors
form_process();
if(form is OK){
//display a thank you message
}else{
//redirect BACK TO THE FORM
}
The problem is that the form collection doesn't carry through with the redirect, so the user's inputs are lost. I usually post a page back to itself and deal with this by having the form and thank you message be separate files, BUT...
Is there any way to gather the form collection (name-value pairs) and send them on in the header as a second HTTP post, going to the redirected page?
And, is sending headers excruciatingly difficult, and is there any resouce on this? HTTP Headers have always been a mystery I've wanted to learn more about.
Thanks from me and other interested parties.
Sam Fullman
Compass Point Media