Forum Moderators: coopster
When I use a form with a "post" action, then do some error checking on the result, then redirect to a different page using header('Location: somewhere.php') I cannot access the $_POST variables anymore from the previous page.
Are they wiped out when you redirect to another page?
When I include the "somewhere.php" file within the form file, I can still get to them.
I've always wondered about this: if you create a bunch of variables on one page, then go to another page, are the variables from the previous page distroyed? Are these variables (like $somevariable) "page-specific" in scope?
I was never sure, but I had though that $_POST variables were "global" because they were "superglobal" variables, but, from the results I'm getting, they don't appear to be truly "global".
Can someone help clear my head about this?