title: How can I clear / reset my contact form after successfully mail sent?
body: <p>I got this mail.php. My contact form remains same with user submitted data even after email is sent successfully, aajaxalert says thank you its sent but that message stays only for few seconds if a dumb user misses this, then he might try clicking "send" message again. How can I reset whole form?</p>
  
  <pre><code>&lt;?php
      header('Content-Type: text/html; charset=utf-8');
      function sendFeedback($feedback_email, $feedback_msg,
              $feedback_name  , $feedback_subject)
       {
          /* EDIT THIS */
          $admin_email = "mail@website.com";
          if ($feedback_subject == "Subject" || empty($feedback_subject) ) {
              $subj = "Email from website.com.au";
          } else {
              $subj = $feedback_subject;
          }
          /* //EDIT THIS */
  
          $message = "
          &lt;html&gt;
          &lt;head&gt;
            &lt;title&gt;Email from your site&lt;/title&gt;
          &lt;/head&gt;
          &lt;body&gt;
              &lt;p&gt;&lt;a href='mailto:".$feedback_email."'&gt;".$feedback_name."&lt;/a&gt;
                         send this message:&lt;/p&gt;
              &lt;p&gt;".$feedback_msg."&lt;/p&gt;
              &lt;p&gt;".$subject."&lt;/p&gt;
          &lt;/body&gt;
          &lt;/html&gt;
          ";
          $headers  = 'MIME-Version: 1.0' . "\r\n";
          $headers .= 'Content-type: text/html; charset=UTF-8' . "\r\n";
  
          if (($feedback_name!=="Name" &amp;&amp;
               $feedback_email!=="Email" &amp;&amp;
               !empty($feedback_email
             ) &amp;&amp; (
                    !empty($feedback_msg) &amp;&amp; 
                    !empty($feedback_name))
                {
              if($feedback_email == "mail_error")
              {
                echo "&lt;span class='ajaxok'&gt;$feedback_name , You entered an
                              Invalid email address.&lt;/span&gt;";
              } else {            
                  mail($admin_email, $subj, $message, $headers);
                  echo "&lt;span class='ajaxok'&gt;Thank You! $feedback_name,
                                    Your message has been sent.&lt;/span&gt;";  
                  }
          } else {
              echo "&lt;span class='ajaxalert'&gt;Hi $feedback_name you forgot to type
                      the  message. &lt;/span&gt;";     
          }   
      }
  
      sendFeedback($_POST['email'], 
        $_POST['message'], $_POST['name'], $_POST['subject']);
      ?&gt;
  </code></pre>