I created another php page with html and php code in it. What i want is
exact what is done in an form action when a new php file is loaded, but
without letting the customer pushing a button.
Include works for including php code with functions and the header()
function works if it is the first output sent in the script (otherwise you
get errors like: Warning: Cannot modify header information - headers already
sent by (output started at D:\Inetpub\wwwroot\xxxxxx.php:5) in
D:\Inetpub\wwwroot\xxxxxx.php on line 31
But what i want is to load another php/html script and stop the running
script. I guess it should be done with the header() function but then i have
to put the test rigth in the beginning of the script?

Arnold


"Alex Hogan" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> [snip]
> How can i load another php file ("another.php") directly without an action
> (example: clicking on a button)?
> [/snip]
>
> If you're looking to check a condition and then add another php file
> to your existing page then;
>
> if(isset($var1)) {
>     include ('another.php');
>     or
>     include_once('another.php');
> }
> is what you're looking for.
>
> If you're looking to redirect to another file based on a condition then;
>
> if(isset($var)){
>     header('Location: another.php');
> }
>
> will work.
>
>
> alex hogan

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

Reply via email to