|
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/
Navigation:
[Reply to this message]
|