Re: PHP Logic problem...am clueless
| From: | Leif K-Brooks | Date: | Sun, 13 Apr 2003 20:09:50 +0000 |
| Subject: | Re: PHP Logic problem...am clueless | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-143691@lists.php.net to get a copy of this message | ||
I'd use an array, like:
$sites = array(1 => 'site to go to for product id 1 goes here',2=>'site for id 2',3 => 'site for id 3');
Then redirect to $sites[$productid].
Ryan A wrote:
Hiya guys, I have a little problem that I cant seem to figure out...maybe you can help me. I dont know exactly how to explain it but Here goes: (I will be getting a "productId" from somesite.com via the "POST" method.) I am giving a client a config.php file where he will add something like this: $productId=1; $site=(site to go to comes here) $productId=2; $site=(site to go to comes here) $productId=3; etc I have no idea how many productIds/sites the client is going to put in config.php The script that will be doing all the main processign is: main.php If you have any ideas I would love to hear of them or if you think this is hopeless tell me and I'll drop the whole notion....coz right now I am as clueless as a woman in a shoeshop :-) Kindly reply. Cheers, -Ryan-- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.