On Tue, Apr 03, 2001 at 09:05:57AM +0100, Galvin, Max wrote:
> Why not a simple if statement to check if the function worked and then
> include("script2.php") ?
> M

Well... I've got three reasons for that...

1. I never use include() for redirection. It was never meant to be
used for that anyway.

2. If you use include() you're only using up more memory. And I
don't know 'bout you, but I always try to write as efficient as I

3. When you redirect someone, you want them to go to a different
page don't you? Using include() they still stay on the same page.
They only get a different content.

So... using header() instead of include() is more efficient i.m.o.
And besides that; my projects get pretty large. In that case it's
smart to keep your code 'easy-to-track'. If you start including
instead of redirecting it only gets more complex tracking the flow
of the site. And that while include() offers no advantages.

[ I.m.o. ]


* R&zE:

**  Renze Munnik
**  M: +31 6 218 111 43

PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to