|
-
Apr 7th, 2003, 02:55 AM
#1
Thread Starter
Addicted Member
php redirect
i have a form... 
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
-
Apr 7th, 2003, 09:05 PM
#2
Lively Member
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");
Master of Cyber Fu - A Temple of Digital Chi
-
Apr 8th, 2003, 11:17 PM
#3
Stuck in the 80s
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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|