Page 1 of 1
I can't make a newline or carriage return
Posted: Tue Aug 20, 2002 3:14 pm
by HUWUWA
Hi guys, I'm getting data from a form and mailing it to myself but I can't make a newline/carriage return
Here is what I do:
$strMailMessage="From: " . $strName . "\n\r" . "Email: " . $strEmail;
It comes out all on one line.
It should look like this:
From: Joe Blow
Email:
joe@php.net
What am I doing wrong ? Thanks.
Posted: Tue Aug 20, 2002 3:19 pm
by llimllib
well, first off, the line terminator for emails is \r\n (CRLF), not \n\r.
As for why it's not printing a line in between, are you viewing it in a web browser? if so, \r\n's don't make a difference, <br>'s do. do View->Source and see if there's a line in between them.
Posted: Tue Aug 20, 2002 3:30 pm
by HUWUWA
Oops
Hi, yeah, I was checking it on my browser. I'll try it the way you said now.
I'm still kinda a newbie.
Thanks.
Posted: Tue Aug 20, 2002 3:32 pm
by llimllib
don't be ashamed, you've gotta make the little stupid mistakes before you can make the really stupid mistakes.
Posted: Tue Aug 20, 2002 4:23 pm
by Takuma
llimllib wrote:don't be ashamed, you've gotta make the little stupid mistakes before you can make the really stupid mistakes.
I agree to that llimllib...
Posted: Tue Aug 20, 2002 8:20 pm
by gotDNS
don't be ashamed, you've gotta make the little stupid mistakes before you can make the really stupid mistakes.
lol...good way to put it...and it's true...not smart/stupid enough at first
