PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
HUWUWA
Forum Commoner
Posts: 35 Joined: Sat Aug 17, 2002 7:24 pm
Location: Long Island, NY
Post
by HUWUWA » Tue Aug 20, 2002 3:14 pm
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.
llimllib
Moderator
Posts: 466 Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD
Post
by llimllib » Tue Aug 20, 2002 3:19 pm
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.
HUWUWA
Forum Commoner
Posts: 35 Joined: Sat Aug 17, 2002 7:24 pm
Location: Long Island, NY
Post
by HUWUWA » Tue Aug 20, 2002 3:30 pm
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.
llimllib
Moderator
Posts: 466 Joined: Mon Jul 01, 2002 2:19 pm
Location: Baltimore, MD
Post
by llimllib » Tue Aug 20, 2002 3:32 pm
don't be ashamed, you've gotta make the little stupid mistakes before you can make the really stupid mistakes.
Takuma
Forum Regular
Posts: 931 Joined: Sun Aug 04, 2002 10:24 am
Location: UK
Contact:
Post
by Takuma » Tue Aug 20, 2002 4:23 pm
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...
gotDNS
Forum Contributor
Posts: 217 Joined: Tue May 07, 2002 5:53 pm
Location: West Chester, PA
Post
by gotDNS » Tue Aug 20, 2002 8:20 pm
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