Preface:
If you are a beginner in php and if you ever wanted to make a contact page that sends email to admin on submission then this post is for you.
This is a very simple Email Form in php that will help you to understand the process and would help you to make more complex forms.
Introduction:
There are two pages, Contact.html and SendMail.php,
Contact.html is a HTML form where the visitor will submit his name, email and message. and
SendMail.php will get the variables and would displatch email to admin containing all the information.
We will use
PHP MAIL function for sending out email.
Following are the code for HTML Form called Contact.html
Contact.html
------------
Following is the code for SendMail.php that will accept form variables and will send Email.
SendMail.php
------------
I hope this will help you to get into more complex email based forms development.
Please feel free to send me your feedback about this tutorial and any other tutorial you may want to see here, I would love to add more to this forum.
Thanks