title: how to display a hidden table when submit button is clicked and data is inserted in database table in php?
body: <p>I have one from through which I am entering project name and sheet name which will be saved in project table. Based on this I am inserting empty values on another table 'Data'. I am using editable table to update these empty values in database. I want to hide this table till project name and sheet name is submitted and once value is submitted then only table will be displayed. I have tried a lot but after clicking submit button my table gets displayed till page is reloaded and disappers when loading is completed. My code parts are like below.</p>
  
  <pre><code>    &lt;script&gt;
       $(function(){
       $('button#showit').on('click',function(){  
      $('#myform').show();
       });
       });
      &lt;/script&gt;
      &lt;form class="form-horizontal" action="db.php" id="#form1" 
       onSubmit="function();" method="post"&gt;
  
      &lt;input type="text" class="form-control1" name="projectname" 
     id="projectname" required &gt;
      &lt;input type="text" class="form-control1" name="sheetname" id="sheetname" 
      required &gt;
      &lt;button type="submit" name="submit" id="button" class="btn-
       success btn" &gt;Submit&lt;/button&gt;
          &lt;/form&gt;
        &lt;div class="tab-content"  id="myform" style="display:none"&gt;
       &lt;div class="tab-pane active" id="horizontal-form"&gt;
       &lt;?php 
  
         $s4 = "SELECT * FROM data ORDER BY data_id DESC LIMIT 1";
       $res = mysqli_query($bd, $s4);
      while ($row = mysqli_fetch_array($res))
                                   {
                              ?&gt;  
     &lt;table class="table table-bordered" style="width:50%;"&gt;
      &lt;thead&gt;
      &lt;tr&gt;
      &lt;th&gt;Sr.no&lt;/th&gt;
      &lt;th&gt;Column Name&lt;/th&gt;
  
         &lt;/tr&gt;
       &lt;/thead&gt;
       &lt;tbody&gt;
  
     &lt;tr class="odd"&gt;
      &lt;td&gt;1&lt;/td&gt;
       &lt;td id="d1:&lt;?php echo $row['data_id']; ?&gt;" contenteditable="true"&gt;&lt;?php 
      echo $row['d1']; ?&gt;&lt;/td&gt;          
     &lt;/tr&gt;
  
     .
     .
      .
     &lt;/tbody&gt;
      &lt;/table&gt;
     &lt;?php } ?&gt;
     &lt;/div&gt;
     &lt;/div&gt;
   on db.php I have used to get back on my previous page
      &lt;script&gt;
                      alert('Sheet Created Successfully');
                      window.location.href='index.php?success';
  
     &lt;/script&gt;
  </code></pre>