[FX.php List] PHP question...
Bob Patin
bob at patin.com
Wed Apr 29 08:47:07 MDT 2009
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
More information about the FX.php_List
mailing list