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

Your name:

Reply:


Posted by Stefan Mueller on 11/23/05 20:07

> PHP echoes the string 'From: "User" <user@inter.net>', which is sent to
> the browser.
>
> Browser receives this, and tries to interpret it as HTML (assuming page
> has been delivered with text/html header).
>
> In HTML, by definition, anything within < > is interpreted as a markup
> tag (even if it's an invalid tag), and therefore isn't shown.

Okay, thanks for your explanation.
Therefore my thinking was wrong that PHP removes all the PHP statements
before the browser sees the generated code.
I thought that if I do everything within the same PHP section the browser
never has to interpret e.g. $header.

<?php
$headers .= "From: \"User\" <user@inter.net>\n";
...
mail($var_to, $var_subject, $var_body, $var_headers);
?>

But like the practice shows I was wrong.

Stefan

[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

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