From: Alice Wei on

Hi,

I am not sure if this makes sense, but here is a snippet of what I have:

$q=$_GET["q"];

//find out which feed was selected
if($q=="Herald Times")
{
$xml=("http://www.heraldtimesonline.com/rss/news.xml");
}
else{

//execute a whole different php program, like http://localhost/mypages/another_program.php
exit;
}

Is it possible that I could do something like this? If yes, what is the name of the function that I should use?
Thanks for your help.

Alice

_________________________________________________________________
The New Busy is not the too busy. Combine all your e-mail accounts with Hotmail.
http://www.windowslive.com/campaign/thenewbusy?tile=multiaccount&ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_4
From: "Arno Kuhl" on
-----Original Message-----
From: Alice Wei [mailto:ajwei(a)alumni.iu.edu]
Sent: 11 May 2010 10:55 AM
Subject: [PHP] Forward to a Different PHP Script?

Hi,

I am not sure if this makes sense, but here is a snippet of what I have:

$q=$_GET["q"];

//find out which feed was selected
if($q=="Herald Times")
{
$xml=("http://www.heraldtimesonline.com/rss/news.xml");
}
else{

//execute a whole different php program, like
http://localhost/mypages/another_program.php
exit;
}

Is it possible that I could do something like this? If yes, what is the name
of the function that I should use?
Thanks for your help.

Alice
_________________________________________________________________


Use include(mypages/another_program.php);

Cheers
Arno


From: David Robley on
Arno Kuhl wrote:

> -----Original Message-----
> From: Alice Wei [mailto:ajwei(a)alumni.iu.edu]
> Sent: 11 May 2010 10:55 AM
> Subject: [PHP] Forward to a Different PHP Script?
>
> Hi,
>
> I am not sure if this makes sense, but here is a snippet of what I have:
>
> $q=$_GET["q"];
>
> //find out which feed was selected
> if($q=="Herald Times")
> {
> $xml=("http://www.heraldtimesonline.com/rss/news.xml");
> }
> else{
>
> //execute a whole different php program, like
> http://localhost/mypages/another_program.php
> exit;
> }
>
> Is it possible that I could do something like this? If yes, what is the
> name of the function that I should use?
> Thanks for your help.
>
> Alice
> _________________________________________________________________
>
>
> Use include(mypages/another_program.php);
>
> Cheers
> Arno

Alternatively you could use header() to perform a redirect to another
page/site/whatever. With the warning that there should be no output
before the call to header; but see also output buffering if needed.


Cheers
--
David Robley

I owe, I owe, it's off to work I go.
Today is Sweetmorn, the 58th day of Discord in the YOLD 3176.

From: Alice Wei on

> From: akuhl(a)telkomsa.net
> To: ajwei(a)alumni.iu.edu; php-general(a)lists.php.net
> Subject: RE: [PHP] Forward to a Different PHP Script?
> Date: Tue, 11 May 2010 11:01:30 +0200
>
> -----Original Message-----
> From: Alice Wei [mailto:ajwei(a)alumni.iu.edu]
> Sent: 11 May 2010 10:55 AM
> Subject: [PHP] Forward to a Different PHP Script?
>
> Hi,
>
> I am not sure if this makes sense, but here is a snippet of what I have:
>
> $q=$_GET["q"];
>
> //find out which feed was selected
> if($q=="Herald Times")
> {
> $xml=("http://www.heraldtimesonline.com/rss/news.xml");
> }
> else{
>
> //execute a whole different php program, like
> http://localhost/mypages/another_program.php
> exit;
> }
>
> Is it possible that I could do something like this? If yes, what is the name
> of the function that I should use?
> Thanks for your help.
>
> Alice
> _________________________________________________________________
>
>
> Use include(mypages/another_program.php);
>
> Cheers
> Arno

Cool, it worked. Thanks!

>

_________________________________________________________________
Hotmail is redefining busy with tools for the New Busy. Get more from your inbox.
http://www.windowslive.com/campaign/thenewbusy?ocid=PID28326::T:WLMTAGL:ON:WL:en-US:WM_HMP:042010_2
 | 
Pages: 1
Prev: php path and relink
Next: 2D barcodes