Re: How to load another php page?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This (header() function) works only if this is the first output sent to
browser so later in the script this doesnt work anymore, i've tried that.
After that you get error messages like: "Warning: Cannot modify header
information - headers already sent by (output started at
D:\Inetpub\wwwroot\xxxxxxx.php:5) in D:\Inetpub\wwwroot\xxxxxx.php on line
31"
So what i want is to go to another php file everywhere in the php script
with something like: if(thisistrue) { load yyyyy.php; exit; }

Arnold

"Lists" <lists@xxxxxxxxxxxxxxxx> wrote in message
news:747C42D2-1493-11D9-B9A1-000393C80762@xxxxxxxxxxxxxxxxxxx
> Hmmm, I'm not sure I am following you.  Maybe:
>
> header ("Location: page.php");
> exit;
>
> So you could do something like: if this condition then go to new page,
> else go to other page?
>
> -dg
>
> On Oct 2, 2004, at 9:44 AM, Arnold wrote:
>
> > I don't think include replaces the calling php script.
> > What i mean is that i want exactly the same as what is done by an
> > "submit"
> > action but then you have to press a button, whereafter a new phpfile is
> > loaded and the button-press is what i want to ignore.
> >
> > Arnold
> > <afan@xxxxxxxx> wrote in message
> > news:64317.67.41.240.226.1096733647.squirrel@xxxxxxxxxxxxxxxx
> >> if(isset($var1)) { include 'another.php'; }
> >>
> >>
> >>
> >>> Hi,
> >>>
> >>> How can i load another php file ("another.php") directly without an
> > action
> >>> (example: clicking on a button)?
> >>> I'd like to do in my php script:
> >>>
> >>> if(isset($var1)) {  // load another.php }
> >>>
> >>> It is possible to include the file, but i just want to load the whole
> >>> "another.php" file.
> >>> I guess that there should be a php command like "load", but i didnt
> > found
> >>> it
> >>> yet.
> >>>
> >>> Who can help me?
> >>>
> >>> Regards, Arnold
> >>>
> >>> --
> >>> PHP General Mailing List (http://www.php.net/)
> >>> To unsubscribe, visit: http://www.php.net/unsub.php
> >>>
> >>>
> >
> > -- 
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux