PHP help please
- Started
- Last post
- 13 Responses
- Ginja
Hey PHPers,
I'm trying to send mail via a php page, works fine but then i add more than one box to make the message and it doesnt do it.Anyone know whats wrong with the below.
($_POST['userMessage']+['userMes...
- ldww0
don't think all your code made it.
email it to me,.
- UndoUndo0
$msg = $_POST['userMessage '].$_POST['userMessage2'].$_POST ['userMessage3'];
if you want to combine all of the message fields
- Ginja0
Thanks Undo, it works a treat.
- spl33nidoru0
it works for me too but one of my variables is an email address and the email sent will show the variables next to one another (with no space), making them look like a huge email address.
ex :
1st var = newstoday
2nd var =
3rd var = 212-212-212the email body will be
how can i make all of this more presentable (spaces / line break).
thanks
- poomoo0
$msg = $_POST['var1'];
$msg . = "";
$msg. = $_POST['var2'];
$msg . = "";
$msg. = $_POST['var3'];or substitute for , or 2 * or any html you want
- spl33nidoru0
thanks poomoo, but i can seem to make it work.
the mail is sent by a php from vlash variables, here's my code :
- spl33nidoru0
argh, the code isn't showing... crap
- spl33nidoru0
works now, thanks!
- UndoUndo0
with spaces
$msg = $_POST['userMessage '].' '.$_POST['userMessa ge2'].' '.$_POST ['userMessage3'];
with line returns
$msg = $_POST['userMessage '].' \n\r'.$_POST['userMessa ge2'].' \n\r'.$_POST ['userMessage3'];
hope that helps
- spl33nidoru0
i don't know what's wrong but neither spaces nor line break work when i try it... \n\r is just added to my email body with the variables o_O
- UndoUndo0
you can send me yr script if you want.
- UndoUndo0
or use pastebin
- spl33nidoru0
check your emails, thank you so much