Forms and your Website
One way to retain viewer interest in your Website is to use forms. Forms provide a way of passing information from the Web browser to the server. Once this information arrives at the server, it is available for processing as required.
The most common form is one that collects viewer information and emails it to the site owner. Order forms are commonly handled this way.
Typically once the viewer submits the form, they are redirected to a 'thank you for filling out the form' page. More complex forms can also calculate a total, deale with credit card processing, add viewer information to a database, and just about anything else you need.
Sample Form
DaySite Webservers are pre-configured with form handlers which take information received from a form and email it to any valid email address. The following example is a common form used for collecting viewer information. The code for creating this form follows, and you can use it in your pages. Just follow the simple instructions.
Code for above form
Instructions
To use this form, you have to edit 3 things. Now stick with me this is easy stuff. We have no intension of turning you into a programmer just yet.
To make these changes, copy the sample code below, and paste it into your favorite text editor. Edit the form as necessary, then copy and paste it into your page.
- First: Change the email address to the address that you want this form sent to. At about the 3rd or 4th line you will find some code that looks like this: value='email address' and replace the words 'email address' with the email address you want. It should look something like this value='you@yourdomain.com'. Make sure to keep the quote marks.
- Second: Change this code value='Name your form here' to whatever you like. Typically this is a short phrase used to identify the form. Something like 'Order Form', or 'Viewer Information' will do, but you put anything you like. This information will appear in the Subject line of the email you receive.
- Third: After the viewer submits the form, they should be reassured that their information was sent. Typically they would be redirected to a 'thank you' page, but if you have not created one, you could simply redirect them to you home page. To do this simply change this code: value='http://www.yourdomain.com/thanks.htm' to the URL of your thank you page.
- Finally