title: Page not found when I submit a form but it shows when I reload the same url
body: <p>I am using the following template file to create a new page  from wordpress dashboard. </p>
  
  <pre><code>&lt;?php 
    /*
      Template Name: admin info form
    */
  ?&gt;
  
  &lt;?php 
  require_once('includes/Admin_profile.php');
  require_once('includes/session.php');
  
  get_header(); 
  
  ?&gt;
  
  
  
    &lt;?php 
  if(isset($_POST['submit-btn']))
  {
  
  
     $admin_info=new Admin_profile();
     $admin_info-&gt;admin_prof_id=$_SESSION['admin_id'];
     $admin_info-&gt;name=$_POST['name'];
     $admin_info-&gt;degree=$_POST['degree'];
     $admin_info-&gt;school=$_POST['school'];
     $admin_info-&gt;college=$_POST['college'];
     $admin_info-&gt;uni=$_POST['uni'];
     $admin_info-&gt;pres_addr=$_POST['pres_addr'];
     $admin_info-&gt;per_addr=$_POST['per_addr'];
     $admin_info-&gt;mobile=$_POST['mobile'];
     $admin_info-&gt;department=$_POST['dept'];
      $admin_info-&gt;save(); 
  
  
  
  
  }
  
  
  ?&gt;
   &lt;div id="admin-login-form"&gt; 
  &lt;div class="error_required_fields"&gt;Fill up all required fields. * indicated fields are required&lt;/div&gt;
  
    &lt;form name="input" action="#" method="post"&gt;
      &lt;table&gt;
  
        &lt;tr&gt;&lt;td&gt; Name:&lt;/td&gt;&lt;td&gt;&lt;input class="name" type="text" name="name" /&gt;&lt;/td&gt; &lt;td&gt;&lt;p class="required"&gt;*&lt;/p&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt; Last academic degree:&lt;/td&gt;&lt;td&gt;&lt;input class="degree" type="text" name="degree" /&gt;&lt;/td&gt; &lt;td&gt;&lt;p class="required"&gt;*&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
        &lt;tr&gt;&lt;td&gt; School:&lt;/td&gt;&lt;td&gt;&lt;input class="school" type="text" name="school" /&gt;&lt;/td&gt;&lt;td&gt;&lt;p class="required"&gt;*&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; 
         &lt;tr&gt;&lt;td&gt; College:&lt;/td&gt;&lt;td&gt;&lt;input class="college" type="text" name="college" /&gt;&lt;/td&gt; &lt;/tr&gt;
         &lt;tr&gt;&lt;td&gt; University:&lt;/td&gt;&lt;td&gt;&lt;input class="uni" type="text" name="uni" /&gt;&lt;/td&gt; &lt;/tr&gt;
         &lt;tr&gt;&lt;td&gt;Present Address:&lt;/td&gt;&lt;td&gt;&lt;input class="pres_addr" type="textarea" name="pres_addr" /&gt;&lt;/td&gt;&lt;td&gt;&lt;p class="required"&gt;*&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; 
         &lt;tr&gt;&lt;td&gt;Present Address:&lt;/td&gt;&lt;td&gt;&lt;input class="per_addr" type="textarea" name="permanent_addr" /&gt;&lt;/td&gt; &lt;td&gt;&lt;p class="required"&gt;*&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;
         &lt;tr&gt;&lt;td&gt;Mobile number:&lt;/td&gt;&lt;td&gt;&lt;input class="mobile" type="text" name="mobile" /&gt;&lt;/td&gt; &lt;td&gt;&lt;p class="required"&gt;*&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt;  
  
         &lt;tr&gt;&lt;td&gt;Mobile number:&lt;/td&gt;&lt;td&gt;&lt;input class="mobile" type="text" name="mobile" /&gt;&lt;/td&gt; &lt;td&gt;&lt;p class="required"&gt;*&lt;/p&gt;&lt;/td&gt;&lt;/tr&gt; 
         &lt;tr&gt;&lt;td&gt;Depertment:&lt;/td&gt;&lt;td&gt;
         &lt;select name="options"&gt;
        &lt;option value="not selected" selected="selected"&gt;Choose favorite subject&lt;/option&gt;
                  &lt;option value="Mathematics"&gt;Mathematics&lt;/option&gt;
                  &lt;option value="Chemestry"&gt;Chemestry&lt;/option&gt;
                  &lt;option value="Biology"&gt;Biology&lt;/option&gt;
  
         &lt;/select&gt;&lt;/td&gt;
         &lt;td&gt;&lt;p class="required"&gt;*&lt;/p&gt;&lt;/td&gt;
         &lt;/tr&gt;
  
  
        &lt;tr&gt;&lt;td&gt; &lt;/td&gt;&lt;td class="btn"&gt; &lt;input type="submit" class="submit-btn" name="submit-btn" value="Submit" /&gt;&lt;/td&gt;&lt;/tr&gt;
      &lt;/table&gt; 
  
  &lt;/form&gt;
  
        &lt;/div&gt;       
  
  
     &lt;?php
  
      get_footer();
      ?&gt;
  </code></pre>
  
  <p>But when I submit the form it shows- 404 error (No page found). I notice that url is: <code>http://localhost/wordpress/admin-info/#</code> . I copy this url and paste it in a new tab. Then it show the page. What problem going on. please help. </p>