[thelist] redirecting a post in php (or asp)

aardvark roselli at earthlink.net
Fri Aug 18 13:43:48 CDT 2000


> From: "Eduardo Dominguez" <edmz at emonterrey.com>
>
> I am doing some form processing. I want the user to fill
> some fields in page1.php and have the form post the data
> to page1.php to check if its correct. If they are not correct, 
> it fills the fields that we just received so that they can be edited.
> 
> If they are correct, it (somehow, i dont know if its possible)
> posts the data to page2.php as if it were coming from the form.

server-side redirects of form data can be done, but it's a hassle and 
sometimes imperfect...

why do you need a second page?

i always code my forms into one script, which ends up helping the 
user, too...

- form is there, user fills it out, submits...
- form gets processed, finds erros... form redraws with 
incorrect/missing fields highlighted, user corrects, submits...
- form gets processed, finds all good data, does whatever... form 
page redraws as a thank you page...

this also helps prevent people from hitting the target script directly, 
and keeps users from having to use 'back' buttons when it's 
pointless, and keeps you from haveing to have the full form in two 
scripts...





More information about the thelist mailing list