Using Forms in your Page

Web Hosting That Works
WebMail

Home Page

New To Websites
  Website Primer
  Site Costs

eCommerce
  About eCommerce
  Shopping Cart
  Merchant Account

Data Centers
  Web Servers
  Data Protection
  RAID & Archive

Web Hosting
  Virtual Host
  Managed
  Dedicated
  Compare Plans
  FAQ
  Cities We Serve

Domain Name
  Naming Tips
  Register

HTML
  FrontPage
  Page Design
  Images
  HTML Tags
  Color Chart

JavaScript
  Introduction
  Resourses

Database
  Database Demo
  MySQL
  DBI
  Perl
  PHP

Programming
  Perl   JavaScript
  JSP vs ASP
  Tips

CGI
  Basics
  Email Forms
  Example Form

eMarketing
  Search Engines
  Interactivity
  Marketing 101

EMail
  About Email
  OutlookExpress
  Spam Filter
  Email Viruses

FTP
  WS_FTP Program



Web Host Ratings

 



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.

Some Heading

Name:
Address:
City:
State:
Zip:
Phone:
Fax:
Email:
Add me to your mail list: Yes



 

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
<form action='/cgi-bin/fmail.pl' method='post'> 

<input type='hidden' name='recipient' value='your email address here'> 
<input type='hidden' name='subject' value='Name your form here'> 
<input type='hidden' name='thankurl' value='http://www.domain.com/thanks.htm'>

  
  <div align='center'>
    <table border='1' width='400' cellspacing='0'>
      <tr>
        <td width='50%'>Name:</td>
        <td width='50%'>
        <input type='text' name='name' size='20'></td>
      </tr>
      <tr>
        <td width='50%'>Address:</td>
        <td width='50%'>
        <input type='text' name='address' size='20'></td>
      </tr>
      <tr>
        <td width='50%'>City:</td>
        <td width='50%'>
        <input type='text' name='city' size='20'></td>
      </tr>
      <tr>
        <td width='50%'>State:</td>
        <td width='50%'>
        <input type='text' name='state' size='20'></td>
      </tr>
      <tr>
        <td width='50%'>Zip:</td>
        <td width='50%'>
        <input type='text' name='zip' size='20'></td>
      </tr>
      <tr>
        <td width='50%'>Phone:</td>
        <td width='50%'><input type='text' name='phone' size='20'></td>
      </tr>
      <tr>
        <td width='50%'>Fax:</td>
        <td width='50%'><input type='text' name='fax' size='20'></td>
      </tr>
      <tr>
        <td width='50%'>Email:</td>
        <td width='50%'><input type='text' name='username' size='20'></td>
      </tr>
      <tr>
        <td width='50%'>Add me to your mail list:</td>
        <td width='50%'><input type='checkbox' name='maillist' value='ON'>
        Yes</td>
      </tr>
      <tr>
        <td width='100%' colspan='2'>
          <p align='center'><input type='submit' value='Submit'></td>
      </tr>
    </table>
  </div>
</form>




	
        


DaySite Web Hosting
1400 North Beach Street
Ormond Beach (Daytona), Florida 32174

386-589-5734
Web@DaySite.Net







Home | New To Websites | eCommerce | Web Hosting | Domain Name | HTML | Database | Programming | CGI | eMarketing | EMail | FTP

 
 
 

 

 


- Order Here -

Free
Domain Name Registration

With

Full Feature
Web Site Hosting

Just $15 a Mo.

Key Features
  Secure Servers
  Prof. Managers
  Personal Support
  Data Protection

Other Features
  Super Connectivity
  Ample Disk Space
  Extensive Email
  Spam Filters
  Virus Filters
  Web Site Stats
  CGI, Perl, PHP
  MySQL Database
  SSL Directory
  Free Domain Names

Call:
877-329-4839
(Toll Free)

eCommerce

FREE SSL

Secure Servers

Apache

Web Servers

MySQL Database Programming

Perl Database Programming

database programming

Since 1997

Domain Name Checker