in reply to Re^4: Redirecting values from 1 script to another
in thread Redirecting values from 1 script to another
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
| A reply falls below the community's threshold of quality. You may see it by logging in. |