redirecting with variables *depending* on a variable
| From: | Ryan A | Date: | Wed, 30 Apr 2003 20:11:10 +0000 |
| Subject: | redirecting with variables *depending* on a variable | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-145848@lists.php.net to get a copy of this message | ||
Hi,
can this be done:
I will be getting a string of values and variables
($name,$product_id,$country,$state,$zip etc etc) from a POST method from
address http://blahblah.com/somecgi.cgi .
Is there any way I can do this:
if($product_id=1)
{send to php script that handles id 1 (script1.php)}
else if($product_id=2)
{send to php script that handles id 2 (script2.php)}
....etc
the part which i am worried about is it has to send it to the new script
(script1.php or script2 .php) WITH all the variables mentioned on top.
If you have any ideas on how this can be done please tell me, with your idea
of doing this would appreciate some code example/s to explain as am a bit of
a newbie myself. if giving me a code example is too much of a pain just
point me to where i can read up on it for the next few hours :-D
Thanks in advance.
Cheers,
-Ryan