Branching to a page

From: Date: Tue, 11 Dec 2001 16:45:33 +0000
Subject: Branching to a page
Groups: php.general 
Request: Send a blank email to php-general+get-77311@lists.php.net to get a copy of this message
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

« previous php.general (#77311) next »