simpli Posted March 24, 2009 Share Posted March 24, 2009 Hi, I am having problems with the header function. I think I dont understand it and I'm stepping back a little to see if I can learn it better. Here is my situation: I have a form that calls itself back when the submit is pressed. After the data is validated and I have written on the database I want to go to another page and that's where it doesnt work. Now I know one thing: If I have output anything to the web page I know that header will not work. My question is this: Since the form calls itself back does that mean the header function will inherently not work in this situation? Can you propose me an alternative or a workaround? Thank you, J-R Quote Link to comment Share on other sites More sharing options...
lonewolf217 Posted March 24, 2009 Share Posted March 24, 2009 you can submit to the same page, just validate everything , submit to the database and redirect before outputting anything to the client (i.e. outputting your form) Quote Link to comment Share on other sites More sharing options...
simpli Posted March 24, 2009 Author Share Posted March 24, 2009 We are agreed however that the first time I go through the file my form is going to be output (as I show it to the user)? So for it to work I must make sure that in the validation process nothing whatsoever is returned to the user before I use the header function is this correct? J-R Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.