Contact Form Submission emailed

the mail() function

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 86
Joined: Sat Nov 26, 2011 8:39 am
Location: Pueblo, CO

Sun Dec 04, 2011 8:24 am

By guide completely this is the most anyone can do without writing the code for you.

Gather the POST variables from your form.
$name = $_POST['name']
$message = $_POST['message']

Prepare the Email
$to = ""
$subject = "Someone Likes you enough to send you a message"
$message = "You have a new message from". $name "<br /><br />". $message
$headers = 'From:' . "\r\n" .
'Reply-To:' . "\r\n" .
'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers)

If you cant get it to work with that abstract then make a charitable donation to my NFL Sunday Beer fund and ill write your code.

Post Reply