Use the following HTML code to create a basic feedback form that sends you an email when submitted. When a visitor submits this form, the PHP script will generate an email to the webmaster containing the contents of the completed form.
The PHP script is a basic script but it works well. Because of its simplicity, it is very easy to follow. Feel free to customize the code for your own purposes.
Installation:
Once you've downloaded the .zip file above, do the following:
- |
Extract all four files to
a directory located within your website (on your local machine). If
you don't have a copy of your website on your local machine, any
directory will do for now, as long as you upload all files to your
hosting provider after the following steps.
|
- |
Open send_mail.php and
find the line that reads $webmaster_email = "name@example.com"; (at
the top of the file). Change the name@example.com email address to
your own email address (or where ever the form contents should be
emailed to).
|
- | Once you have checked that the form works on your server, customize the look and feel of feedback_form.html, thank_you.html, and error_message.html to suit your website.If you change the names of the files, be sure to update the PHP script to reflect the new names. |
Also, if you are familiar with HTML/PHP, you could combine the code from all four files into one PHP file.
However, this would require substantial modification so, unless you know what you're doing, keep them as four separate files.
Download: feedback_form.zip.
Source: http://www.quackit.com
Keyword:
Send e-mail from a form | Email Form | From an HTML Form to an Email Inbox | Set
up an HTML mailto form | HTML Tutorial | How to get email from an HTML form
submission | Email Me Form | How to create a form and make it email its content
to your mailbox | how to make an email form in html | html email form code | php
email form | html email form php | html contact form | html email form generator
| javascript email form | html form email submit
|
You may also like: