Reply to Re: Why can't I create the string "User" <user@inter.net>

Your name:

Reply:


Posted by John McClumpha on 11/23/05 12:37

On Wed, 23 Nov 2005 02:55:14 +0100, "Stefan Mueller"
<seekware-remove-@yahoo.com> wrote:

>For sending an email with the PHP mail function mail() I have to create an
>header like
> "User" <user@inter.net>
>
>Why am I not able to create it?
>
> <?php
> $name = "User";
> $email = "user@inter.net";
> $header = "From: \"$name\" <$email>";
> echo $header;
> ?>
>
>The result of echo $header is:
> From: "User"

if you view the source of the resulting page you will find that
<user@inter.net> is there... your browser is interpreting it as an
html tag (although not a valid one) and not displaying it... if you
want to display it use &lt; and &gt; rather than < and >

as far as using the mail() function - the string $header you have
created will work

--
John McClumpha
Darkness Reigns - http://www.incitegraphics.com.au/darkness/

[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

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