Need type="text" input fields to display previously-POST'd entries if errors occur
<p>I've probably not explained what I"m trying to do in the title very well, so here goes:</p>

<p>I've got a HTML entry form, in a <code>.php</code> file.  That entry form when submitted files a <code>POST</code> operation.  That POST operation has code to check field input, similar to this:</p>

<pre>
    &lt;?php

    ...

    if ($_POST["submitted"] == 1) {  
        //"submitted" is a hidden field with value '1' in the form 

        $isvalid = 1; // Inits to 1, changes to 0 if something fails checks.

        $field1 = $_POST["field1"];
        $field2 = $_POST["field2"];

    ...

    /*
      Checks for validation on each field go here,
      but are not relevant to this question here.
    */

    }

    if ($isvalid == 1) {
        // Send email
    } else { ?>
        &lt;!-- Print form, and error msg. --&gt;

    ...

    &lt;input name="field1" type="text" id="field1" size="32" class="stylingclass"&gt;

    ...

</pre>

<p>So the above is example code, but here's the real question:  How can I get any of the text input fields in my form, when submitted and an error occurred, to automatically contain the previous values that were entered, so that the user can correct the entries accordingly, based on whatever constraints I've set?</p>
