Hi everyone! What I did to make it work is..
-- -- <start> if (array_key_exists('Template', $_GET)) { $template = join (" ", $_GET['attributes']); } switch($template) { case 'TemplateOne': echo "one"; break; case 'TemplateTwo': echo "two"; break; } -- -- <end> As simple as that. :) Im learning! -- Thank you, Louie -----Original Message----- From: Mark [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 02, 2003 10:41 PM To: Miranda, Joel Louie M; '[EMAIL PROTECTED]' Subject: Re: [PHP] 2values on form, help in catching as one. It's not clear what you're trying to do. If the values are for a radio button or checkbox, use the same name for both buttons. The values have to be mutually exclusive for what you;re trying to do to work. You could do something like this: if (isset($_REQUEST['TemplateOne']) { $test=$_REQUEST['TemplateOne']; } elseif (isset($_REQUEST['TemplateTwo']) { $test=$_REQUEST['TemplateTwo']; } else { $test=""; } echo $test; ------ or this: $test=0 if (isset($_REQUEST['TemplateOne']) { $test=1; } if (isset($_REQUEST['TemplateTwo']) { $test+=2; } switch ($test) { case 1: echo "one"; break; case 2: echo "two"; break; case 3: echo "one and two"; break; } Without knowing what you're actually trying to do, however, we're all just shooting in the dark. --- "Miranda, Joel Louie M" <[EMAIL PROTECTED]> wrote: > I have this php code (below), My form passes 2 values w/c is > TemplateOne and TemplateTwo I was wondering how could I make that in > php to catch the value > as one only? I tried this and it didn't work. But if the value is > just one > the case display it. Any ideas? > > <?php > $v_template = $_REQUEST['TemplateOne'] ; > $v_template = $_REQUEST['TemplateTwo'] ; > > switch($v_template) { > case 'TemplateOne': > echo "one"; > break; > > case 'TemplateTwo': > echo "two"; > break; > } > ?> > > -- > Thank you, > Miranda, Louie > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > ===== Mark Weinstock [EMAIL PROTECTED] *************************************** You can't demand something as a "right" unless you are willing to fight to death to defend everyone else's right to the same thing. *************************************** __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! http://sbc.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php