<form> and </form>
PURPOSE: To make a basic form
UPDATE ** The new version 6 browsers will sometimes not render the email form data correctly and only
send you a blank page. CGI scripts are highly recommended to use for submitting your data. Forms can also be used with ASP and PHP code.
The form action code will depend on what type programming is being utilitized for submitting the data.
Here is a example for CGI form action:
<form action="http://www.somewhere.com/cgi-bin/formmail" method="post">
Here is a basic email form action:
<form action="mailto:somebody@somewhere.com" method="post" enctype="text/plain">
Here is a example for ASP form action:
<form name="input" action="html_form_action.asp" method="post">
Here is a example for PHP form action:
<form action="formmail.php" method="post">
There are two methods to send form data to a server. GET, the default, will send
the form input in an URL QUERY_STRING which is a string of characters visible in
your browser's "location" window, such as, filename.cgi?name=smith&email=somebody@somewhere.com.
POST sends it in the body of the submission.
The POST method can send larger amounts of data, and the URL
of the form results does not show the encoded form.
Below is a basic html document. The referenced html tag is in RED. All tags must have a start and a end tag. Most end tags have a / before the tags name, however there are a few that are done differently. The tags that end differently will be noted and highlighted. The order of the start and end tags is also very important to proper display of your page in a web browser.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title> The Page Title Goes Here </title>
</head>
<body>
<form action="mailto:somebody@somewhere.com" method="post" enctype="text/plain">
<p>
Your Name:<input type="text" name="name" size="27" /><br>
</p>
<p>
<fieldset>
<legend>
How often do you visit my site?<br>
</legend>
<input type="radio" name="visit" value="daily" />Every Day<br>
<input type="radio" name="visit" value="weekly" />Weekly<br>
<input type="radio" name="visit" value="monthly" />Monthly<br>
</fieldset>
</p>
<p>
Do you find the tutorials on my site helpful?<br>
<input type="checkbox" name="like" value="yes" />Yes<br>
<input type="checkbox" name="like" value="no" />No<br>
</p>
<p>
Choose a selection:
This tutorial section is
<select name="satisfaction">
<option>Helpful</option>
<option>Confusing</option>
<option>Not Helpful</option>
</select>
</p>
<p>
Add any comments below:<br>
<textarea cols="40" rows="10" name="comments"></textarea>
</p>
<p>
<input type="submit" value="Send" />
<input type="reset" value="Reset" />
</p>
</form>
</body>
</html>
The above code produces the following form:
© Copyright 2001,2002 Southern Twilight All rights reserved.