Re: Branching to a page
| From: | Jason G. | Date: | Thu, 13 Dec 2001 13:13:36 +0000 |
| Subject: | Re: Branching to a page | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-77579@lists.php.net to get a copy of this message | ||
Just send a redirect header.
header("Location: nextpage.php");
exit;
-Jason Garber
IonZoft.com
At 08:45 AM 12/11/2001 -0800, Todd Cary wrote:
I open a socket if I am in the middle of a php script to branch to a page so that I can send the header information. However, I understand that this is not how most php programmers do it. Could someone share with me the way it is done with php? In more detail, this is how I structure a page: 1) The Form calls itself - the same page. 2) At the top of the page, I do my validation and I may check to see if a "Cancel" button was pressed. 3) Depending on the circumstances, I branch to another page. /* Example: was the Cancel button pressed?If so, branch to redirect page */if (!empty($cancel)) {$http = new http; $fp = $http->http_fget($server, $path . "redirect.php",""); if($fp) { print '<BASE HREF="' . $url . 'redirect.php"><p>'; fpassthru($fp); exit; }} Many thanks..... Todd -- Todd Cary Ariste Software todd@aristesoftware.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net