php - Can I set a POST variable before redirecting to a new page? -
possible duplicate:
how post page using php header() function?
for example, need redirect user different page upon error, want post value page well.
you cannot post , redirect in same time. redirect means setting several http headers. however, there several solutions needs.
one store data $_session , retrieve there, answered above.
another way put form aside php, in separate file , include if have errors in data posted, have variables in current post without need redirect user (and set error message in form too).
you can think use ajax make post , result you'll redirection using javascript.
or, if there aren't many variables/values want pass may use when doing redirection.
i'm sure other alternatives exists too.
Comments
Post a Comment