php beginners tutorial
Wednesday, 18 May 2016
How to create contact us form
Contact.php
$email_subject = "Website Contact Form: $name";
$email_body = "You have received a new message from your website contact form.\n\n".
"Here are the details:\n
\nName: $name\n\n
Email: $email_address\n\n
Phone: $phone\n\n
Message:\n$message"; $headers = "From: noreply@yourdomain.com\n"; // This is the email address the generated message will be from. We recommend using something like noreply@yourdomain.com.
$headers .= "Reply-To: $email_address";
mail($to,$email_subject,$email_body,$headers);
return true; ?>
index.html
No comments:
Post a Comment
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment