There is a form that is processed on the same page. After you submit the form to a variable the result is written and displayed in the code below.
The question is: if after sending the form to do a redirect via header(), how to preserve the value of the variable on successful send?
If you use the session variable is the same on all pages with forms. If you write a value in session, then how can and dump it on other pages? It turns out, if you reset it in the beginning of the code, it cleaned up and the current value. Or I something not understand?
Thanks in advance!
Clarification: to Move the script processing to another file is not an option. Unfortunately, it is not an option