Hi All,
Im new to the forum. Ive been trying to write a simple script that will process a form from my website. I have the form working and everything, here is my code:
[php]
$headers = ‘MIME-Version: 1.0’ . “\r\n”;
$headers .= ‘Content-type: text/html; charset=iso-8859-1’ . “\r\n”;
$headers .= 'From: ’ .$_POST[‘email’]. “\r\n”;
$headers .= 'Reply-To: ’ .$_POST[‘email’]. “\r\n”;
$mail_to = "[email protected]";
$mail_subject = “G3 Services Website Comment”;
$mail_body .= "\n First Name: " .$_POST[‘first_name’]. “\n”;
$mail_body .= "\n
Last Name: " .$_POST[‘last_name’]. “\n”;
$mail_body .= "\n
Email Address: " .$_POST[‘email’]. “\n”;
$mail_body .= "\n
Phone Number " .$_POST[‘phone’]. “\n”;
$mail_body .= "\n
Comments:
" .$_POST[‘comment’]. “\n”;
[/php]
One thing I’m trying to is format the email headers so i know who the email is from. Right now, is just tells me their email address. Is there a way I can have it say From: First Last Name [email protected] ??
Thanks a bunch!
Juston