Reply to Re: concatanate 2 strings

Your name:

Reply:


Posted by Philip Ronan on 06/20/05 19:03

"Desmond" wrote:

> Can someone please tell me how to concatanate to strings like this
> please
>
>
> $name = $_POST["Name"];
> $from = $_POST["Email"];
>
> $headers = "From: $name $from\r\n";

Did you try that? It ought to work exactly as you wrote it.

However, if you want a valid "From" header, put the email address in angle
brackets like this:

$headers = "From: $name <$from>\r\n";

And please check that the $_POST[] data is valid. For example, check that
the email address is correctly formatted, and that the "Name" data doesn't
contain any newline characters. You might also need to apply stripslashes()
to the data from your form.

The PHP documentation is here: <http://www.php.net/docs.php>

--
phil [dot] ronan @ virgin [dot] net
http://vzone.virgin.net/phil.ronan/

[Back to original 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

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