Jump to content

adding the text box to the mail


Gatsu
 Share

Recommended Posts

Hi, I have a website that will send mail with these codes:Form:

<?phpif (isset($_REQUEST['email']))//if "email" is filled out, send email  {  //send email  $email = $_REQUEST['email'];  $subject = $_REQUEST['subject'];  $message = $_REQUEST['message'];  mail( "info@planet-zix.se", "Subject: $subject",  $message, "From: $email" );  echo "Thank you for using our mail form";  }else//if "email" is not filled out, display the form  {  echo "<form method='post' action='mailform.php'>  MSN: <input name='msn' type='text' /><br />  Subject: <input name='subject' type='text' /><br />  Message:<br />  <textarea name='message' rows='15' cols='40'>  Test:  </textarea><br />  <input type='submit' />  </form>";  }?>

and...mailform.php

<?php$to = "info@planet-zix.se";$subject = $_POST["subject"];$msn = $_POST["msn"];$message = $_POST["message"];$from = "Leveling Order";$headers = "From: $from";mail($to,$subject,$message,$headers);echo "Thank you for using my mail form //Gatsu";?>

Now how do I manage to get the MSN field in the mail?I have no idea how to do this so the $msn I added in mailform.php are probably totally wrong ^^I want the msn field to show in the message.Anybody know how to fix this or atleast show me what tutorial to read?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...