PHP Cant Figure Out How To Add Space

dquigley

New Member
Messages
249
Reaction score
0
Points
0
So here is the code, I must be doing something wrong

PHP:
 $message = 'Hello,

You have recieve this message from, '.$_POST[sender_name].' , who is a member of Dollars To Riches their email address is '.$_POST[sender_email].' they thought you may like to visit our site. 

Dollars To Riches is a website dedicated to helping you make money online. We specialize in providing our members with the resources and tools they need to be successful with a online business.

Join us now, you could be making up to $46,860.00 a year, OR MORE! Not only can you make a lot of money with our program but you will also be able to do all of this in the comfort of your own home, so dont wait visit our site now. 

Click the link below.

http://www.dollarstoriches.com/?ref='.$_SESSION['userid']

.$_POST[sender_name].' has used our Tell-a-Friend form to send you this email.';

And here is what the email looks like

Hello,

You have recieve this message from, David , who is a member of Dollars To Riches their email address is blah@blah.net they thought you may like to visit our site.

Dollars To Riches is a website dedicated to helping you make money online. We specialize in providing our members with the resources and tools they need to be successful with a online business.

Join us now, you could be making up to $46,860.00 a year, OR MORE! Not only can you make a lot of money with our program but you will also be able to do all of this in the comfort of your own home, so dont wait visit our site now.

Click the link below.

http://www.dollarstoriches.com/?ref=1David has used our Tell-a-Friend form to send you this email

The problem is


I need it to say

http://www.dollarstoriches.com/?ref=1David
http://www.dollarstoriches.com/?ref=1David

Thanks a bunch
 

xPlozion

New Member
Messages
868
Reaction score
1
Points
0
lol, make it this
PHP:
 $message = 'Hello,

You have recieve this message from, '.$_POST[sender_name].' , who is a member of Dollars To Riches their email address is '.$_POST[sender_email].' they thought you may like to visit our site. 

Dollars To Riches is a website dedicated to helping you make money online. We specialize in providing our members with the resources and tools they need to be successful with a online business.

Join us now, you could be making up to $46,860.00 a year, OR MORE! Not only can you make a lot of money with our program but you will also be able to do all of this in the comfort of your own home, so dont wait visit our site now. 

Click the link below.

http://www.dollarstoriches.com/?ref='.$_SESSION['userid']

.' '.$_POST[sender_name].' has used our Tell-a-Friend form to send you this email.';

noticed how i put .' '. before sender_name? that will add a space, because although you add a space or even a new line, unless it's in a string, it's not gonna notice it.
 

leafypiggy

Manager of Pens and Office Supplies
Staff member
Messages
3,819
Reaction score
163
Points
63
Break out of the variable?

Use /r/n to break a line.
 
Top