On 3 Feb 2005 Richard Lynch wrote: > If it was only two pages, and there was only one header() re-direct, fine. > > But what ends up happening is you get in the habit of doing this all over > the place, and you have a mess of spaghetti logic spread over a hundred > files.
That is a problem with coding practices, not with the method used. All you need to do is write a redirect() function used in all pages and call it instead of header(). Then you have one point to change if you need to make a change as you describe. The fact that someone did not do this does not mean the underlying method is a poor idea. It just means they didn't anticipate the need for application-specific code as part of the redirect operation. Put another way, it's a common error to fail to build an abstraction layer for this type of low-level operation, but it doesn't mean using the low-level operation is a mistake. The error, if there is one (and I'd say there is in the scenario you describe) is in not noticing the need for an abstraction layer. -- Tom -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php