-
php redirect
i have a form... :D
when the submit button is clicked it goes to another php file to process it and write to the db. after that is done, i want it to redirect to another page...how do i do that?
how do i make it goto to another page?
just a side question..not connected to the above
is there a way of checking if there is a query string, like if (_POST[] == null) or something like that? cause i want to do something different if theres no query string.
thanx a lot
--770
-
work'n it
Here is an example of instantly recalling that php page:
header("Location: ".$_SERVER['PHP_SELF']);
you can replace that with your other php file if wanted:
header("Location: next.php");
-
Just remember that no output can be sent to the browser before the header() function is used.
This includes html, echos, and, unless it's been changed, not even a blank line before your <?php tag.