[FX.php List] Alternative to Include( )/require( )

Gjermund Gusland Thorsen ggt667 at gmail.com
Wed Aug 16 03:20:50 MDT 2006


This is very often bad:
---
header('Location: page2.php');

This however is good:
---
header('Location: page2.php');
exit;

ggt667

On 8/1/06, Jonathan Schwartz <jonathan at eschwartz.com> wrote:
> Holy $#%$!!!!.
>
> I put ob_start() at the top of page 1, together with using
> header('Location: page2.php') and the whole thing just started
> working.
>
> I actually didn't have a problem on page 2 once it loaded on it own,
> instead of being included in page 1.
>
> Thank you. Thank you. Thank you!
>
> jonathan
>
>
> At 10:56 AM -0500 8/1/06, Alex Gates wrote:
> >I've been using
> >ob_start();
> >
> >At the VERY top of the page - -
> >
> >It has worked so far with me.... not sure if it is going to turn around
> >and bite me in the butt, though.
> >
> >More on ob_start() --->
> >http://us2.php.net/manual/en/function.ob-start.php
> >
> >Any thoughts from anyone?
> >
> >Alex P. Gates
> >G&R Publishing Co.
> >507 Industrial Street
> >Waverly, IA 50677
> >Ph: 319-352-5391 x 319
> >
> >-----Original Message-----
> >From: fx.php_list-bounces at mail.iviking.org
> >[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Jonathan
> >Schwartz
> >Sent: Tuesday, August 01, 2006 10:53 AM
> >To: FX.php Discussion List
> >Subject: [FX.php List] Alternative to Include( )/require( )
> >
> >This is a basic issue of script page navigation that eludes me.
> >
> >I can navigate from one page to a second script page when using form/
> >button.  Same for <a href> links. No issue there.
> >
> >However, when using 'if'/else scripting, and the desired result is to
> >navigate to a second page, the only functions I know are include ()
> >or require ().  These functions load page 2 into page 1, but then the
> >page 1 url is still showing in the browser address.  I am also having
> >difficulty troubleshooting my present page 2 because page 1 keeps
> >appearing when page 2 scripts fail.
> >
> >I just want to navigate to page 2 and leave page 1 behind.
> >
> >I have attempted to use the header()  function, but run afoul of "Can
> >not modify header" error messages due to using sessions.
> >
> >How is that best done?
> >
> >Thanks very much.  This one has bothered me for some time.
> >
> >Jonathan
> >--
> >
> >Jonathan Schwartz
> >Schwartz & Company
> >jonathan at eschwartz.com
> >http://www.eschwartz.com
> >
> >_______________________________________________
> >FX.php_List mailing list
> >FX.php_List at mail.iviking.org
> >http://www.iviking.org/mailman/listinfo/fx.php_list
> >
> >
> >
> >
> >_______________________________________________
> >FX.php_List mailing list
> >FX.php_List at mail.iviking.org
> >http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
> --
>
> Jonathan Schwartz
> Schwartz & Company
> jonathan at eschwartz.com
> http://www.eschwartz.com
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>


More information about the FX.php_List mailing list