Jump to content

adding the text box to the mail


Gatsu

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

Archived

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

×
×
  • Create New...