Just forwarding Carlos' response to the list...

---------- Forwarded message ----------
From: Carlos Sura <carlos.su...@googlemail.com>
Date: 17 December 2011 01:15
Subject: Re: [PHP] dealing with this code $_POST['custom´]
To: Marc Guay <marc.g...@gmail.com>




On 16 December 2011 15:57, Marc Guay <marc.g...@gmail.com> wrote:
>
> > $saving_list = $_POST['custom'] == 'FR' ? 148 : 147;
>
> Hi there, here's a quick translatation of this code that might help
> you understand it better:
>
> if ($_POST['custom'] == 'FR'){
>  $saving_list = 148;
> }
> else{
>  $saving_list = 147;
> }



Hello,

Thank you both for answer me.

Also I would like to thank you Marc Guay, because with your answer I
figured out how to do it.

My code is like this:

//$saving_list = $_POST['custom'] == 'FR' ? 148 : 147;
  if ($_POST['custom'] == 'FR'){
                $saving_list = 148;
               }
  if ($_POST['custom'] == 'EN'){
                $saving_list = 147;
               }
 else{
 $saving_list = 152;
 }

I'm not sure if that's the best way, but it is working for me as I
expected, althought any other recommendation would be great.

Regards
--
Carlos Sura.-
www.carlossura.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to