Jump to content

making sure an email contains all the fileds I want


barça

Recommended Posts

Hi
For an email from a form, Ive been recommended the following php to send me the comments

[code]$mailbody = $_POST['comments'];[/code]

but I also have three other IDs I want to enter from the html form.
these are
1 title
2 namefield
3 concerning

How do I add these multiple entries?
Change your code to this:
[code]$mailbody = $_POST['title'] . "\n";
$mailbody .= $_POST['namefield'] . "\n";
$mailbody .= $_POST['concerning'] . "\n";
$mailbody .= $_POST['comments'];[/code]
Is that what you want?

If not could explain in more detail what you are trying to do.
[!--quoteo(post=382590:date=Jun 11 2006, 07:30 PM:name=Richard181)--][div class=\'quotetop\']QUOTE(Richard181 @ Jun 11 2006, 07:30 PM) [snapback]382590[/snapback][/div][div class=\'quotemain\'][!--quotec--]
maybe he wants those widthin the email in that case you change them to variables

$namefield=$_POST['namefield'];

them put all of them how ever you want the form to show..
[/quote]
Which is what I have done. [img src=\"style_emoticons/[#EMO_DIR#]/huh.gif\" style=\"vertical-align:middle\" emoid=\":huh:\" border=\"0\" alt=\"huh.gif\" /]

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.