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