title: remain text field data after window message
body: <p>When the user entered wrong or empty field value and the window message prompts out, how do I retain the data in the text fields that the user had entered after the window message?</p>
  
  <pre><code>&lt;?php if(empty($value) &amp;&amp; in_array($key, $required_fields) === true) {?&gt;
          &lt;script type="text/javascript"&gt;
          alert("Fields marked with an asterisk are required");
          history.back();
          &lt;/script&gt;
  &lt;?php } ?&gt;
  </code></pre>