The University of Texas at Austin- What Starts Here Changes the World
Services Navigation

Example 4 - Sample Form


This tutorial does not cover how to build Web forms. For information on how to create forms see the Forms Section in Learning to Publish. The important element in this form is the form action. It points to a php script called ex4.php:


The following code was used to create this form:

<form method="post" action="ex4.php">

<label for="name">What is your name?</label> <input type="text" name="name" id="name">

<label for="yearborn">What year were you born? <input type="text" name="yearborn" id="yearborn">
<label for="favcolor">What is your favorite color? <input type="text" name="favcolor" id="favcolor">

<input type="Submit" value="Submit to Test PHP Script">


  Updated 2006 August 16
  Comments to