Re: PHP Email Form
| From: | David Robley | Date: | Tue, 09 Apr 2002 11:29:16 +0000 |
| Subject: | Re: PHP Email Form | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-92209@lists.php.net to get a copy of this message | ||
In article <20020409110431.60397.qmail@pb1.pair.com>,
kenny_declan@hotmail.com says...
> Hi I have an online email form but I can't get the text layout the same as
> the layout someone types in the text Area, here is the final bit of code:
>
> $message = stripslashes($message);
> $message = htmlentities($message);
> $message = nl2br($message);
> $from="From: $email";
> $to= "myaddress@domain.com";
> mail($to,$subject,$message,$from);
>
> Basicly the problem is if someone puts a new line in the text area this
> appears as <BR />. example:
> Hi,
> this is a test
>
> would end up
> Hi,
> <br />
> this is a test.
>
>
> Any help please?
Take out the nl2br - that's only for html
--
David Robley
Temporary Kiwi!
Quod subigo farinam