title: Clear html text fields
body: <p>I have an HTML form for submitting and retrieves data from MySQL database with two buttons, "Save/Submit" and "New/Reset"
  It fetch data correctly from MySQL database but when I click on New/Reset button for new contact entry it couldn't clear forms text fields. My HTML and PHP codes are as under:</p>
  
  <pre><code>&lt;?php
  //Database Connection file.
  include'connect.php';
  $sql = mysql_query("SELECT * FROM contact_list WHERE id='1'");
  While($result = mysql_fetch_assoc($sql)){
     $fname = $result['fname'];
     $lname = $result['lname'];
     $email = $result['email'];
     $contact = $result['contact'];
  }
  
  if(isset($_POST['fname'])&amp;&amp;isset($_POST['lname'])&amp;&amp;isset($_POST['email'])&amp;&amp;
  isset($_POST['contact'])){
     $fname = $_POST['fname'];
     $lname = $_POST['lname'];
     $email = $_POST['email'];
     $contact = $_POST['contact'];
  
  if($sql = mysql_query("INSERT INTO contact_list VALUES ('', '$fname', '$lname',
  '$email', '$contact')")){
     echo'Contact Save Successfully.';
  }else{
     echo'Contact not save.';
  }
  }
  ?&gt;
  &lt;html&gt;
  &lt;form action="sample.php" method="POST"&gt;
     First Name:&lt;input type="text" name="fname" value="&lt;?php if(isset($fname))
     {echo $fname;}?&gt;"&gt;
     Last Name:&lt;input type="text" name="lname" value="&lt;?php if(isset($lname))
     {echo $lname;}?&gt;"&gt;
     Email:&lt;input type="text" name="email" value="&lt;?php if(isset($email))
     {echo $email;}?&gt;"&gt;
     Contact:&lt;input type="text" name="contact" value="&lt;?php if(isset($contact))
     {echo $contact;}?&gt;"&gt;
  //Clean all fields of forms for new entry.
     &lt;input type="reset" value="New"&gt;
  //Save or submit form data into mysql database
     &lt;input type="submit" value="Save"&gt;
  &lt;/form&gt;
  &lt;/html&gt;
  </code></pre>