Jump to content

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\" /]
This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.