Answer the question
In order to leave comments, you need to log in
Resetting $_POST after submitting while saving the session?
Good day!
There is a form which is processed on the same page. After submitting the form, the result is written to the variable and displayed in the code below.
The question is this: if after submitting the form to do a redirect through header (), then how to save the value of the variable about successful submission?
If you use session: the variable is the same for all pages with forms. If you write a value to the session, then how to reset it on other pages? After all, it turns out that if you reset it at the beginning of the code, then it will also clean up the current value. Or am I misunderstanding something?
Thanks in advance!
Clarification: Transferring the processing script to another file is not an option. Unfortunately not really an option.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question