title: My form adding blank field on refreshing the page
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/6454875/how-to-validate-a-form-using-javascript">how to validate a form using JavaScript?</a>  </p>
  </blockquote>
  
  
  
  <p>I want to use javascript thats my form will not add any data to table on refresh or by blank field my code is here  </p>
  
  <pre><code>&lt;form id="form1" name="form1" method="post" onsubmit="return validateForm()" action=""&gt;
      Name &lt;input type="text" name="name" /&gt; &lt;br /&gt;
      Website &lt;input type="text" name="website" /&gt; &lt;br /&gt;
      Description &lt;input type="text" name="description" /&gt; &lt;br /&gt;
        &lt;input type="submit" name="submit" value="Submit"/&gt;
      &lt;/form&gt;
      &lt;?php
      global $wpdb;
      $wpdb-&gt;query("insert into ".PRO_TABLE_PREFIX."tutorial ( name, website, description )
      values('{$_POST['name']}','{$_POST['website']}','{$_POST['description']}')");
  
      ?&gt;
  </code></pre>