On Tue, 25 Mar 2008 20:13:33 -0700 (PDT),
mtek@mtekusa.com wrote:
>Hi,
>
>I have a PHP script which performs some processing. And, when that is
>done, I want to use the 'header' command to load a different page.
>
>I read that this command must be the first in the script, before
>anything else is put to the screen. I have a bunch of coding to
>define variables and store them in a MySQL database, but nothing goes
>to the screen.
>
>After I perform all my processing, I put the header command in and all
>I get is a blank screen?? If I put the command at the top of the
>file, it works fine. The problem is, I have conditional statements in
>this script, which will load different pages depending on the
>condition met:
>
>if (some condition) {
> load page 1
>} else {
> load page 2
>}
>
>If hte header must be the first line, how can I accomplish this?
>
>Thanks!
>
>John
It doesn't have to be the first thing in your script but it does have
to be the first thing that is served out. I have a couple of scripts
where the header is 25-30 lines down in the script; but, it's the
first thing that the script sends out
Check your script. You must have something being served out prior to
your header. Maybe something in an included file that's at the top of
your script?