Hello Gary,
Please research the difference between a single quote and a double quote.
Also, you can use the operator .=(dot + equal) in this manner:
if(!empty($_POST['fname'])) {
$msg .= "$lname\n";
} else if(!empty($_POST['lname'])) {
$msg
""Daevid Vincent"" wrote in message
news:7d7c84d94dd24035a620e68b5b937...@mascorp.com...
>> - Original message -
>> From: Gary
>> To: php-general@lists.php.net
>> Date: Monday, December 13, 2010, 7:47:49 PM
>> Subject: [PHP] empty() in email message
>>
>> I have an email message
>>
>>
"Andre Polykanine" wrote in message
news:1110253876.20101214025...@oire.org...
> Hello Gary,
>
> Try using this:
> if (!empty($beefolives)) $msg.="Order: beef olives";
> or:
> $msg.=empty($beefolives)? "": "Order: beef olives";
>
> --
> With best regards from Ukraine,
> Andre
> Skype: Francophi
"Paul M Foster" wrote in message
news:20101213181124.gq21...@quillandmouse.com...
> On Mon, Dec 13, 2010 at 12:47:49PM -0500, Gary wrote:
>
>> I have an email message
>>
>> $msg = 'Name: $fname ' . ' $lname\n'
>> . "Phone: $phone\n"
>> . "Email: $email\n"
>>
>> and it works fine, however in thi
""Daniel P. Brown"" wrote in message
news:aanlktikw+h1nvf6tcg5hgh-2xsubtuosvgkwaynb=...@mail.gmail.com...
On Mon, Dec 13, 2010 at 12:47, Gary wrote:
> I have an email message
>
> $msg = 'Name: $fname ' . ' $lname\n'
> . "Phone: $phone\n"
> . "Email: $email\n"
>
> and it works fine, however in t
"Bastien Koert" wrote in message
news:aanlktimimt6h+g+zg4a_78wls4bu09zzsa3jvdujj...@mail.gmail.com...
On Mon, Dec 13, 2010 at 12:47 PM, Gary wrote:
> I have an email message
>
> $msg = 'Name: $fname ' . ' $lname\n'
> . "Phone: $phone\n"
> . "Email: $email\n"
>
> and it works fine, however in th
> - Original message -
> From: Gary
> To: php-general@lists.php.net
> Date: Monday, December 13, 2010, 7:47:49 PM
> Subject: [PHP] empty() in email message
>
> I have an email message
>
> $msg = 'Name: $fname ' . ' $lname\n'
> . "Phone: $phone\n"
> . "Email: $email\n"
>
> and it works
Hello Gary,
Try using this:
if (!empty($beefolives)) $msg.="Order: beef olives";
or:
$msg.=empty($beefolives)? "": "Order: beef olives";
--
With best regards from Ukraine,
Andre
Skype: Francophile
Twitter: http://twitter.com/m_elensule
Facebook: http://facebook.com/menelion
- Original messa
On Mon, Dec 13, 2010 at 12:47, Gary wrote:
> I have an email message
>
> $msg = 'Name: $fname ' . ' $lname\n'
> . "Phone: $phone\n"
> . "Email: $email\n"
>
> and it works fine, however in this message there are about 30 variables that
> are being called...as such
>
> . "Order: beefschnitzel $beef
On Mon, Dec 13, 2010 at 12:47:49PM -0500, Gary wrote:
> I have an email message
>
> $msg = 'Name: $fname ' . ' $lname\n'
> . "Phone: $phone\n"
> . "Email: $email\n"
>
> and it works fine, however in this message there are about 30 variables that
> are being called...as such
>
> . "Order: beefs
How are these variables being given their values by php? If you're making use
of register_globals then you're asking for problems.
Perform some sanity checks on your data, like using a regex of /^\d+$/ to check
for numerical values, and turn globals off; its a security breach waiting to
happen.
On Mon, Dec 13, 2010 at 12:47 PM, Gary wrote:
> I have an email message
>
> $msg = 'Name: $fname ' . ' $lname\n'
> . "Phone: $phone\n"
> . "Email: $email\n"
>
> and it works fine, however in this message there are about 30 variables that
> are being called...as such
>
> . "Order: beefschnitzel $b
12 matches
Mail list logo