This question already has an answer here:
- Email Form more than 20 values 3 answers
I am pretty new to all this and I need some help. This is the most basic mail function in PHP.
<?php
$headers = "Content-Type: text/html; charset=UTF-8";
$name=$_POST['name'];
$email=$_POST['email'];
$subject=$_POST['subject'];
$phone=$_POST['phone'];
$message=$_POST['message'];
$to ="maria@mkitra.com";
$subject2 = "Work";
mail($to, $subject2, $message, $headers, $name);
echo "Message Sent";
?>
It does send the email but my problem is that the mail function doesn't include either the user's email nor their phone number. How do I include them in the email?
I have tried
mail($to, $subject2, $message, $headers,$phone,$email $name);
But it says, the mail
function can take maximum 5 parameters. I am confused.
</div>