in reply to Re^3: Redirecting values from 1 script to another
in thread Redirecting values from 1 script to another

This node falls below the community's threshold of quality. You may see it by logging in.

Replies are listed 'Best First'.
Re^5: Redirecting values from 1 script to another
by fishbot_v2 (Chaplain) on Apr 16, 2006 at 14:13 UTC
    I wish i could check if i need redirect before i print the header but i cant.

    Yes, you can. Look at your code again. Printing the user form and validating the user are done in seperate instances of the script. You print the form, the script ends, then the user clicks submit, and the script starts again. You want validate and redirect in this second case.

    The normal way to do this is to validate and redirect if the user has given information. If there are errors or if the user hasn't yet given information, fall through and print the headers and the form.

    A reply falls below the community's threshold of quality. You may see it by logging in.