[FX.php List] PHP question...
Andy Gaunt
andy at fmpug.com
Wed Apr 29 08:53:53 MDT 2009
Bob,
As you found header redirects only work before any content is sent to
the page.
You may need to use a meta refresh
<META HTTP-EQUIV="Refresh" CONTENT="5; URL=your_next_page.php">
Cheers
Andy Gaunt
T: 321-206-3658
andy at fmpug.com
http://www.fmpug.com
FMPug.com: A Developer's best Friend!
FindFileMakerDevelopers.com -
The #1 listings engine for FileMaker Professionals
On Apr 29, 2009, at 10:47 AM, Bob Patin wrote:
> I have a page that loads, and in the body of the code, there's a
> loop that occurs that tries to load in database records if any
> exist. Because of the way the site works, I have to run this loop in
> the body of the page and not at the top, so 75% of the page has
> already been loaded at this point.
>
> What I'd *like* to do is go to the next page if no records are
> loaded; I have a variable that's easy to test, but I can't seem to
> get what I want.
>
> I tried saying this:
>
> if ($counter<1){
> header("Location: review.php");
> }
>
> but for some reason, it doesn't actually send the user to the next
> page. I can test and confirm that the IF statement does validate and
> the code within IS run, but why doesn't it send the user to the next
> page? Is it because a lot of the HTML has already loaded?
>
> If I use an INCLUDE() or REQUIRE(), the top part of this page will
> show on the subsequent page, which is of course not what I want.
>
> Is there another way to redirect after the BODY of a page has
> already started loading?
>
> Thanks,
>
> Bob Patin
>
> Longterm Solutions
> bob at longtermsolutions.com
> 615-333-6858
> http://www.longtermsolutions.com
> iChat: bobpatin
> AIM: longterm1954
> FileMaker 9 Certified Developer
> Member of FileMaker Business Alliance and FileMaker TechNet
> --------------------------
> FileMaker hosting and consulting for all versions of FileMaker
> PHP • Full email services • Free DNS hosting • Colocation • Consulting
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20090429/4fc064e6/attachment.html
More information about the FX.php_List
mailing list