Home
XHTML
CSS
PHP
MySQL
SEO
JavaScript
Computer Basics
Number Systems
LINUX


XHTML Contact Forms

XHTML | Tags | Symbols | Lists | Links | Images | Contact Forms | Declaration

Contact Forms can be used to collect and process data from users. Input is submitted through the form then processed by a script file. Any common scripting language can process a script file. Tutorials for processing forms with PHP are on the Forms page.

The <form> and </form> tags are block tags that declare the form. The action attribute declares the file that processes the data. The method attribute declares the method. The post method is most commonly used for forms. The <input /> tags are self-closing inline tags that declare the form fields. The name attributes are used to reference variables in the script file...

<form action="file.php" method="post">
<p>

<label>Enter Text:</label> <br /><br />
Name: <input type="text" name="name" /> <br /><br />
Location: <input type="text" name="location" />
<br /><br /><br /><br />

<label>Enter Comment:</label> <br /><br />
<textarea rows="4" cols="24" name="comment">
</textarea> <br /><br />
<input type="submit" value="Enter" />
<input type="reset" value="Reset" />
<br /><br /><br /><br />

<label>Choose One Radio Button:</label> <br /><br />
<input type="radio" name="radio" value="radio1" /> Radio1
<input type="radio" name="radio" value="radio2" /> Radio2
<input type="radio" name="radio" value="radio3" /> Radio3
<input type="radio" name="radio" value="radio4" /> Radio4
<br /><br /><br /><br />

<label>Choose One or More Check Boxes:</label> <br /><br />
<input type="checkbox" name="check" value="check1" /> Check1
<input type="checkbox" name="check" value="check2" /> Check2
<input type="checkbox" name="check" value="check3" /> Check3
<input type="checkbox" name="check" value="check4" /> Check4

</p>
</form>

The output to the browser is...



Name:

Location:













Radio1 Radio2 Radio3 Radio4





Check1 Check2 Check3 Check4



The <select> and </select> tags, and <option> and </option> tags are used for dropdown and scrolling form fields...

<form action="file.php" method="post">
<p>

<label>Choose One Option:</label> <br /><br />
<select name="dropdown">
<option selected="selected">option1</option>
<option>option2</option>
<option>option3</option>
<option>option4</option>
</select>
<br /><br /><br /><br />

<label>Choose One Option:</label> <br /><br />
<select size="4">
<option value="option1">Option1</option>
<option value="option2">Option2</option>
<option value="option3">Option3</option>
<option value="option4">Option4</option>
<option value="option5">Option5</option>
<option value="option6">Option6</option>
</select>

</p>
</form>

The output to the browser is...












SEO Vancouver, Washington
SEO Portland, Oregon
Website Design Vancouver, Washington