Hello fellow developers.
I’ve got some weird issue that I really need to get my head around.
I have a registration page and when a user hits submit I send it to a processing page to validate and then back to the registration page with the results.
On the return back to the registration page I look to see if the session is set:
[code=php] if(isset($_SESSION[‘arr_val’]) && isset($_SESSION[‘arr_error’])){ …
The first time a user submits the form the session variables are not set, but if I fill the form out again then the session variables are set.
Here is my redirect from the processing page:
[code=php]header(“Location: “.ROOT_PATH.”registration.php”);
If I redirect like this everything works fine:
[code=php]header(“Location: registration.php”);
WHY?!?! ?