Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Seperate text in email....
Old 07-15-2005, 11:13 AM Seperate text in email....
Junior Talker

Posts: 3
Trades: 0
Hello all. This is part of a form handler, sending the information via email:

$forminfo =
($_POST ['name'] . "\r" .
$_POST ['e-mail'] . "\r" .
$_POST ['instrument'] . "\r" .
$_POST ['doublings'] . "\r" .
$_POST ['experience'] . "\r" .
$_POST ['venue'] . "\r\n" .
date("M-d-Y") . "\r\n\n");

atm the email will just show up with the information from the form itself:

name
e-mail
instrument
doublings
experience
venue

But i want it to be labelled when it gets put into the emailso it actually makes sense, coming out thus:

Name:name
E-mail:e-mail
Doublins:doublings

you get the picture....

I've tried all sorts but can't seem to be able to do it. Whenever I insert anything it comes up with error messages!

any suggestions?
JumpinZack is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 07-15-2005, 06:04 PM
Experienced Talker

Posts: 47
Trades: 0
From what I understand $forminfo is the body of the email. If it is then wouldn't you be able to just add the label before the variable?
Like this:
PHP Code:
$forminfo 
(
'Name: ' $_POST ['name'] . "\r" .
'Email: ' $_POST ['e-mail'] . "\r" .
'Instrument: ' $_POST ['instrument'] . "\r" .
'Doublings: ' $_POST ['doublings'] . "\r" .
'Experience: ' $_POST ['experience'] . "\r" .
'Venue: ' $_POST ['venue'] . "\r\n" .
'Date: ' date("M-d-Y") . "\r\n\n"); 
I'm not sure if this is of any help but this is what I understand as your problem
Then when you mail it you just do

PHP Code:
mail($to,$subject,$forminfo,$headers); 
Synchronize is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Seperate text in email....
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.90369 seconds with 12 queries