The code for creating a contact form is provided on the next page, however first we wanted to explain how a contact form works.
When a visitor goes to a contact page on your website, they will have a set of fields they need to enter. Once they have filled in the fields, they will hit the submit button and it will automatically be sent to an email address you specify. Behind the scenes, what happens is when the submit button is hit, the request is sent to a Perl Script or php file, which then reads the request and sends it to your email address. This is all an automated process and a deep understanding of Perl Script or php is not required in order to make the contact form work.
When you receive the email, all the questions that you asked from the visitor will be filled in, each time in the same order and format. This is great as it is easier to read and understand a request or feedback if it is answered in the same manner each time. Also, if you change your email address you want the form to be sent to, only a simple edit of the file needs to be done to make any modifications so that you receive the email to the new email address.
After a visitor submits their request, you can set it so that the visitor is automatically sent to a page that has any message you want. For example it can say "Thank you for your feedback!" or "We will respond to your request shortly!" This is a way for the customer to know that you received the information they submitted. Setting up a contact form does take longer then just supplying an email address, however the benefits discussed in the previous section make it worth the extra time if it will help your website.