April Mains wrote:
>
>On 2012-06-18, at 7:59 AM, James wrote:
>
>>> Original Message
>>> From: April Mains
>>> To:
>>> Cc: "PHP-General list"
>>> Sent: Mon, Jun 18, 2012, 9:41 AM
>>> Subject: Re: [PHP] else
On 2012-06-18, at 7:59 AM, James wrote:
>> Original Message
>> From: April Mains
>> To:
>> Cc: "PHP-General list"
>> Sent: Mon, Jun 18, 2012, 9:41 AM
>> Subject: Re: [PHP] else if vs switch
>>
>> This is what I had been u
> Original Message
>From: April Mains
>To:
>Cc: "PHP-General list"
>Sent: Mon, Jun 18, 2012, 9:41 AM
>Subject: Re: [PHP] else if vs switch
>
>This is what I had been using as the check based on the code that had been
>there previously and along wit
This is what I had been using as the check based on the code that had been
there previously and along with an email validator that sets $email to ""
if the address isn't valid. The purpose of the form is lead generation. The
last bit is to prevent spammers from entering urls in the class text box.
Same logical check with my personal preference ;)
$toaddress = $mapping['default'];
if ( isset($city) && isset($mapping[$city]) ) { ... }
--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
Jim Lucas wrote:
On 6/15/2012 3:29 PM, Joshua Kehn wrote:
> Way easier to just use
On 6/15/2012 3:29 PM, Joshua Kehn wrote:
Way easier to just use a map.
$mapping = array(
'Calgary' => "abc@emailaddress",
'Brooks' => "def@emailaddress",
// etc
);
$toaddress = $mapping[$city];
I would use this, but add a check to it.
$mapping = array(
'default' =>
On 06/15/2012 06:44 PM, April Mains wrote:
> Ah yes that's it.
>
> Thank you for your help. Have a good weekend.
>
> April
>
> On 2012-06-15, at 4:29 PM, Joshua Kehn wrote:
>
>> Way easier to just use a map.
>>
>> $mapping = array(
>> 'Calgary' => "abc@emailaddress",
>> 'Brooks' => "def@
Ah yes that's it.
Thank you for your help. Have a good weekend.
April
On 2012-06-15, at 4:29 PM, Joshua Kehn wrote:
> Way easier to just use a map.
>
> $mapping = array(
> 'Calgary' => "abc@emailaddress",
> 'Brooks' => "def@emailaddress",
> // etc
> );
> $toaddress = $mappin
Way easier to just use a map.
$mapping = array(
'Calgary' => "abc@emailaddress",
'Brooks' => "def@emailaddress",
// etc
);
$toaddress = $mapping[$city];
Regards,
–Josh
Joshua Kehn | @joshkehn
http://joshuakehn.com
On Jun 15, 2012, at
9 matches
Mail list logo