title: How to automatically reload the updated data after clicking the delete button
body: <p>I'm having a problem with my delete button.  It works fine on deleting the preferred delete data.  But, after I deleted the data, the data stay in the table and need to refresh.  Only then the undeleted data will be displayed. </p>
  
  <p><em>delete button</em></p>
  
  <pre><code>&lt;td&gt;
      &lt;a href = "javascript:delete_type( &lt;?php echo $row[ 'id_vehicleType' ]; ?&gt;)"&gt;
          &lt;i class       = "fa fa-trash"
             aria-hidden = "true"&gt;
          &lt;/i&gt;
      &lt;/a&gt;
  &lt;/td&gt;
  </code></pre>
  
  <p><em>javascript</em></p>
  
  <pre><code>&lt;script type = "text/javascript"&gt;
      function delete_type( id_vehicleType )
      {
          if ( confirm( 'Confirm Delete?' ) )
          {
              window.location.href = 'adminVehicleType.php?typeid = ' + id_vehicleType;
          }
      }
  &lt;/script&gt;
  </code></pre>
  
  <p><em>php</em></p>
  
  <pre><code>    // delete record
      if ( isset( $_GET[ 'typeid' ] ) )
      {
          $del_vectype = "DELETE FROM vehicleType
                          WHERE id_vehicleType = " .
                              $_GET[ 'typeid' ];
  
          mysqli_query( $link,
                        $del_vectype );
      }
  ?&gt;
  </code></pre>