This is my first post on this board and I'm still very new to PHP.
I need a little help setting the "From" when sending a form via php.
Below is what I've done to send the form.
Code: Select all
<?php
$first_name = $_POST['first_name'];
$last_name = $_POST['last_name'];
$phone = $_POST['phone'];
$email = $_POST['email'];
$reason = $_POST['reason'];
$comment = $_POST['comment'];
$to = "ghswebdesign@gmail.com";
$subject = $reason;
$body = "Contact Form \n $last_name \n $phone \n $reason \n $email \n $reason \n $comment \n";
$headers = "Contact Form";
mail($to, $subject, $body, $headers);
?>Any ideas?
Thanks for you help!
Todd
High School Web Design Teacher
http://www.mrbenrud.com