You are here: Re: PHPMailer Question about using CC in Forms « All PHP « IT news, forums, messages
Re: PHPMailer Question about using CC in Forms

Posted by shimmyshack on 06/05/07 09:07

On Jun 2, 3:58 pm, cover <coverlandNOSPAM...@yahoo.com> wrote:
> My form processes the lines below just fine so long as there's
> something in the cc field (which I'm trying to leave optional). If the
> cc field of the form is left blank, I get an error. I need an if
> statement where the cc is optionally blank and the $to still works. As
> I have it, the $to line below works well because there's always going
> to be an entry however again, the cc won't be used 100% of the time.
> I was toying around with the if statement below but don't have it
> figured out yet. Any help is appreciated. TIA
>
> $mail->AddAddress($arrEmailAddress[$to]);
> $mail->AddCC($arrEmailAddress[$cc]);
>
> ----------code below clearly not there yet for the cc field-----------
> if ($cc=''''){
> $mail->AddCC($cc);
> }

do you mean?

if( $cc != '' )
{
$mail->AddCC($cc);
}

you could google for "conditionals in php" for more help on using if
statements, but my advice is - if you are this new to php coding, DONT
play with scripts, you could easily create a working spam bot, which
would quickly increase your headaches by many orders of magnitude.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация