Home

  • Basic Tutorial
  • Overview

    Domain Name

    Web Host

    Designing

    Uploading

  • Other Information
  • E-Commerce Website

    Making Money

    Getting Traffic

    Website Additions

  • Navigation
  • Sitemap

     

     

    Home > Website Additions >

    Add Forms to a Web Page

    This tutorial explains how to create feedback forms of your choice and send it to you. You can add any kind of information you want like age, gender or dog's color, if you want so.

    For the script I am going to recommend you need cgi-bin access.

    Download the FormMail script and read the readme included. There are some variables to be changed.

    Now upload the pl file to cgi-bin folder and change the permissions, your access is full and others' access is to read. In Unix/Linux chmod 755.

    HTML Code to Create

    When you got the FormMail running, all you have to do is adding a form, below is an example and the source.

    Name:

    Email:

    I want to subscribe to your newsletter

    Your most favorite topic: Sports Science Animals

    Comments:

    The code for the form is below. You can edit is as you like, the spots marked with red color should be changed to ensure functionality.

    1) Change this to point to your formmail.cgi file

    2) This is the page shown to visitors after submitting. Usually something thankful.

    3) This is the e-mail the form will be sent to.

    <form METHOD=POST ACTION="http://www.yoursite.com/cgi-bin/formmail.cgi">
    <input type=hidden name="redirect" value="http://www.yoursite.com/thankyou.html">
    <input type="hidden" name="recipient" value="email@youremail.com">
    <input type="hidden" name="subject" value="Form Subject">


    <p>Name:
    <input maxlength="40" size="40" name="Name" />
    </p>
    <p> Email:
    <input maxlength="40" size="40" name="Email" />
    </p>
    <p>
    <input checked="checked" value="Yes" name="mailing-list" type="checkbox" />
    I want to subscribe to your newsletter
    </p>
    <p> Your most favorite topic:
    <input checked="checked" value="0-" name="Age" type="radio" />
    Sports
    <input value="26-" name="Age" type="radio" />
    Science
    <input value="50 and over" name="Age" type="radio" />
    Animals</p>
    <p> Comments: <br />
    <textarea name="comments" rows="7" wrap="virtual" cols="50">This is the default text.</textarea>
    </p>
    <p>
    <input value="Submit" name="Request" type="submit" />
    <input value="Clear" name="Clear" type="reset" />

    </form>