Re: passing control to a separate script

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

 



I don't understand what you have against includes. Redirecting the browser as tedd suggested will work but it's a waste of resources to bounce the request off the client unless you have a good reason for doing so (eg. changing the URL the browser is showing or preventing reloads htting the initial script again). If either of those are your goal then it would have been helpful for you to say so.

If not, why are you so against using includes?

-Stuart

Sent from my leaf blower

On 2 May 2011, at 13:55, "Jim Giner" <jim.giner@xxxxxxxxxxxxxxxxxx> wrote:

> Sorry - I responded directly to the responder - BECAUSE - I lost track of 
> who I was answering.  That's what happens when people choose to repond to 
> the poster directly INSTEAD of JUST replying to the list.
> 
> Tedd gave me the 'header' directive and it works just as I imagined 
> something would do.  See below.
> 
>>> Is this do-able?
>> 
>> Yes, this is do-able.
>> 
>> 
>> If you don't want to use a $_POST to trigger the critter, then use 
>> location, such as:
>> 
>> // first script
>> if($to_second_script)
>>  {
>>   header('Location: http://www.example.com/second.php');
>>   exit();
>>   }
>> 
>> // second script
>> if($to_first_script)
>>  {
>>   header('Location: http://www.example.com/first.php');
>>   exit();
>>   }
>> 
>> 
>> Either those will work depending upon the trigger you need.
>> 
>> Cheers,
>> 
>> tedd
>> 
>> -- 
>> -------
>> http://sperling.com/ 
> 
> 
> 
> -- 
> 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