mail ()

liunx

Guest
Hi, i figured out how to get a form submitted to an email address using:
mail("[email protected]", "My Subject", "user\naddress\npass");

I am assuming that user\naddress\npass are the names of your fields in the form? Well, i must be wrong because when the form is submitted in the email i recieve i just get:

user
address
pass

So how do i make it so that the info in the fields that have been submitted are in the email i recieve?

Thanks
JamieThe basic mail is
mail($to, $subject, $message);
Try looking at <!-- m --><a class="postlink" href="http://www.php.net/manual/en/function.mail.php">http://www.php.net/manual/en/function.mail.php</a><!-- m --> for more info on mail(). Also please post PHP questions in the PHP forum.

If you have a form like this

//___your form____\\
<form action="mail.php" method="post">
...</form>
//____mail.php____\\
<?php
echo 'Thanks for emailing me!';
$message = "$_POST['user'] \n $_POST['pass'] \n $_POST['other']";
mail($to, $subject, $message);
?>

Peace,
Ed
:rocker:You should also make sure that sendmail or which ever program is set up properly.
 
Back
Top