title: Input values lost when form submitted with errors
body: <p>My form is working fine with the validations being done by PHP.
  I have three fields: Name, EMail and Message.
  Form and PHP code is within the same pgae, same page is called for validations when user submits the form.</p>
  
  <p>When a user submits the form, same page is called and it checks whether the form is submitted or not.
  If the form is submitted it then does the validations for blank entries and throws error message below the fields to inform user that field is left blank. It also shows error icon next to field.</p>
  
  <p>Till this, it is working fine.</p>
  
  <p>However, the problem, is if the user has filled any field, for example name filed and left the other two fields(EMail and Message) blank, then on submittion, it throws error messages for blank fields which is ok, but for name field which was filled by user it empty the content and shows blank name field and does not show error(as earlier user had filled it).</p>
  
  <p>My only concern is that when it relods the form after submission, it should also reload the earlier values in the respective fields which user input before submitting.</p>
  
  <p>Below is the PHP validation code.</p>
  
  <pre><code>&lt;?php
  error_reporting(E_ALL &amp; ~E_NOTICE);
  
      if(isset($_POST['nameField_Name']) AND isset($_POST['nameField_EMail']) AND isset($_POST['nameField_Message']) AND isset($_POST['nameSubmit'])){  
          // Form Submited  
          if ($_POST['nameField_Name']) {
      $phpVarNameField = mysql_escape_string($_POST['nameField_Name']);
  } else {
      $errormsgNameField = "Name field is required, Please enter your Name.";
  
  }
  
  if ($_POST['nameField_EMail']) {
      $phpVarEMailField = mysql_escape_string($_POST['nameField_EMail']);
  } else {
      $errormsgEMailField = "E-Mail field is required, Please enter your E-Mail ID.";
  }
  
  if ($_POST['nameField_Message']) {
      $phpVarMessageField = mysql_escape_string($_POST['nameField_Message']);
  } else {
      $errormsgMessageField = "Message field is required, Please enter your Message.";
  }
      }  
  ?&gt;
  </code></pre>
  
  <p>Below is the form code.</p>
  
  <pre><code>                &lt;form name="myform" action="contactus.php" method="post""&gt;
                  &lt;div id="r1"&gt;
                      &lt;div id="r1c1"&gt;
                          &lt;input type="text" name="nameField_Name" id="idField_Name" placeholder="Enter your name here"/&gt;
                      &lt;/div&gt;
                      &lt;div id="r1c2"&gt;
                   &lt;?php  
                        if(isset($errormsgNameField)){  // Check if $msg is not empty  
                    echo '&lt;img src="error.png" width="45" height="45" style="margin: 5px 0px" alt=""&gt;';
                        }  
                      ?&gt; 
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div id="afterr1"&gt;
                 &lt;?php  
                        if(isset($errormsgNameField)){  // Check if $msg is not empty  
                    echo '&lt;div class="statusmsg" id="idErrorMsgNameField"&gt;'.$errormsgNameField.'&lt;/div&gt;'; // Display our message and wrap it with a div with the class "statusmsg".  
                        }  
                      ?&gt;  
  
                  &lt;/div&gt;
                  &lt;div id="r2"&gt;
                      &lt;div id="r2c1"&gt;
                          &lt;input name="nameField_EMail" type="text" id="idField_EMail" placeholder="Enter your E-Mail address here" /&gt;
                      &lt;/div&gt;
                      &lt;div id="r2c2"&gt;
                  &lt;?php  
                        if(isset($errormsgEMailField)){  // Check if $msg is not empty  
                    echo '&lt;img src="error.png" width="45" height="45" style="margin: 5px 0px" alt=""&gt;';
                        }  
                      ?&gt; 
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div id="afterr2"&gt;
                  &lt;?php  
                        if(isset($errormsgEMailField)){  // Check if $msg is not empty  
                    echo '&lt;div class="statusmsg" id="idErrorMsgEMailField"&gt;'.$errormsgEMailField.'&lt;/div&gt;'; // Display our message and wrap it with a div with the class "statusmsg".  
                        }  
                      ?&gt;  
                  &lt;/div&gt;
                  &lt;div id="r3"&gt;
                      &lt;div id="r3c1"&gt;
                          &lt;textarea name="nameField_Message" id="idField_Message" placeholder="Enter your message for us here"&gt;&lt;/textarea&gt;
                      &lt;/div&gt;
                      &lt;div id="r3c2"&gt;
                  &lt;?php  
                        if(isset($errormsgMessageField)){  // Check if $msg is not empty  
                    echo '&lt;img src="error.png" width="45" height="45" style="margin: 115px 0px" alt=""&gt;';
                        }  
                      ?&gt; 
  
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div id="afterr3"&gt;
                  &lt;?php  
                        if(isset($errormsgMessageField)){  // Check if $msg is not empty  
                    echo '&lt;div class="statusmsg" id="idErrorMsgMessageField"&gt;'.$errormsgMessageField.'&lt;/div&gt;'; // Display our message and wrap it with a div with the class "statusmsg".  
                        }  
                      ?&gt;  
                  &lt;/div&gt;
  
                  &lt;div id="r4"&gt;
                      &lt;div id="r4c"&gt;
                          &lt;input type="Submit" name="nameSubmit" id="idButton_Submit" value="Submit"  alt="Submit Button"/&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;/form&gt;
  </code></pre>
  
  <p>Any help will be great on this.</p>
  
  <p>Thank You.</p>