Re: [PHP] dealing with this code $_POST['custom´]

2011-12-17 Thread Stuart Dallas
On 17 Dec 2011, at 13:27, Marc Guay wrote: > Just forwarding Carlos' response to the list... > > > -- Forwarded message -- > From: Carlos Sura > Date: 17 December 2011 01:15 > Subject: Re: [PHP] dealing with this code $_POST['custom´] >

Fwd: [PHP] dealing with this code $_POST['custom´]

2011-12-17 Thread Marc Guay
Just forwarding Carlos' response to the list... -- Forwarded message -- From: Carlos Sura Date: 17 December 2011 01:15 Subject: Re: [PHP] dealing with this code $_POST['custom´] To: Marc Guay On 16 December 2011 15:57, Marc Guay wrote: > > > $saving_li

Re: [PHP] dealing with this code $_POST['custom´]

2011-12-16 Thread Govinda
> "syntax error" I'm not an advanced user of PHP, but I really don't get why > adding just another id (of a contact list) would be a "syntax error" if I > only use 148:147 it works fine! Hi Carlos, it is called "ternary operator". Search for "ternary operator" in this page: http://www.php.net/

Re: [PHP] dealing with this code $_POST['custom´]

2011-12-16 Thread Marc Guay
> $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; } -- PHP General Mailing List (http://www.php.net/) To unsubscr

[PHP] dealing with this code $_POST['custom´]

2011-12-16 Thread Carlos Sura
Hello mates, My problem is very simple, I want to save the forwards emails in some contact list so I'm saying what list in the following code: } else { $saving_list = $_POST['custom'] == 'FR' ? 148 : 147; So, what I'm actually doing is: } else { $saving_list = $_POST['custom'] == 'FR' ? 152