Jump to content

mail() help needed


manu_ghimire

Recommended Posts

hello

 

i just got this code for mailing the form data to email

i am having mulptipe fileds in form other then subject message

look at the code

 

<form method=post action=mailtest.php>
First Name <input type=text name=firstName>
Favorite Food <input type=text name=favoritefood>
Hobby<input type=text name=hobby>
email<input type=text name=email>
<input type=submit>
</form>

]

 

now mailtest.php

 

<?
$body = "Someone submitted the following information from our Astromatch form.
First Name: $firstname
Favorite food: $favoritefood
Hobby: $hobby
email: $from
";
$from=$_POST['email'];
mail("manu_ghimire@yahoo.com", "hello", $body ,"From: $from\n");
?>
email sent successfully!

 

 

now problem here is i am able to recieve the email successflly but the problem is the fileds inside the body which are

firstname

fav food

hobby

 

are not there in email

email recieved is like this

-------

Firstname :

favfood:

hobby:

 

 

thanx for paying attention kindly tell me where should i make the changes

 

Link to comment
Share on other sites

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.