title: Updating database on bootstrap button click
body: <p>I am trying to send a value to my mysql database, I am very new to php/bootstrap programming and I've tried everything but most of the guides are beyond my understanding. Please guide me in the right path so on the button click the button will update the specific database.</p>
  
  <p>Here's what the button click will do:
  on Uninstall button click it will send update the database like </p>
  
  <p>UPDATE activate="No" FROM software WHERE uid(or id)="same id of the row where the button is clicked" [I know this mysql query is wrong]</p>
  
  <p>Here's my code:</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
    &lt;head&gt;
      &lt;meta http-equiv="Content-Type" content="text/html; charset=UTF-8"&gt;
      &lt;meta charset="utf-8"&gt;
      &lt;meta http-equiv="X-UA-Compatible" content="IE=edge"&gt;
      &lt;meta name="viewport" content="width=device-width, initial-scale=1"&gt;
  
  
      &lt;title&gt;Control Panel&lt;/title&gt;
      &lt;!-- Bootstrap --&gt;
      &lt;link href="css/bootstrap.min.css" rel="stylesheet"&gt;
      &lt;!-- Font Awesome --&gt;
      &lt;link href="css/font-awesome.min.css" rel="stylesheet"&gt;
      &lt;!-- NProgress --&gt;
      &lt;link href="css/nprogress.css" rel="stylesheet"&gt;
      &lt;!-- iCheck --&gt;
      &lt;link href="css/green.css" rel="stylesheet"&gt;
      &lt;!-- Datatables --&gt;
      &lt;link href="css/dataTables.bootstrap.min.css" rel="stylesheet"&gt;
      &lt;link href="css/buttons.bootstrap.min.css" rel="stylesheet"&gt;
      &lt;link href="css/fixedHeader.bootstrap.min.css" rel="stylesheet"&gt;
      &lt;link href="css/responsive.bootstrap.min.css" rel="stylesheet"&gt;
      &lt;link href="css/scroller.bootstrap.min.css" rel="stylesheet"&gt;
  
      &lt;!-- Custom Theme Style --&gt;
      &lt;link href="css/custom.min.css" rel="stylesheet"&gt;
    &lt;/head&gt;
  
    &lt;body class="nav-md"&gt;
      &lt;div class="container body"&gt;
        &lt;div class="main_container"&gt;
          &lt;div class="col-md-12 left_col"&gt;
            &lt;div class="left_col scroll-view"&gt;
                &lt;div class="col-md-12 col-sm-12 col-xs-12"&gt;
                  &lt;div class="x_panel"&gt;
                    &lt;div class="x_content"&gt;
                      &lt;table id="datatable-buttons" class="table table-striped table-bordered"&gt;
      &lt;thead&gt;
      &lt;tr&gt;
          &lt;th&gt;S/N&lt;/th&gt;
          &lt;th&gt;Date&lt;/th&gt;
          &lt;th&gt;IP Address&lt;/th&gt;
          &lt;th&gt;UID&lt;/th&gt;
          &lt;th&gt;Activation&lt;/th&gt;
          &lt;th&gt;Command&lt;/th&gt;
      &lt;/tr&gt;
      &lt;/thead&gt;        
      &lt;tbody&gt;
  
      &lt;?php
      $count_rows = 0;
      include 'database_connection.php';
      $sql = "SELECT `date`, `ip`, `id`, `activate` FROM `software`";
      $result = $conn-&gt;query($sql);
  
      while ($row = mysqli_fetch_array($result)):
          $count_rows++;
          ?&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;?php echo $count_rows ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php echo $row['date']; ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php echo $row['ip']; ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php echo $row['id']; ?&gt;&lt;/td&gt;
              &lt;td&gt;&lt;?php echo $row['activate']; ?&gt; &lt;td&gt;&lt;button type="button" id="btn-uninstall" class="btn btn-danger btn-xs"&gt;Uninstall&lt;/button&gt; &lt;button type="button" id="btn-install" class="btn btn-success btn-xs"&gt;Install&lt;/button&gt; &lt;button type="button" id="btn-upgrade" class="btn btn-warning btn-xs"&gt;Upgrade&lt;/button&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;?php endwhile; ?&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  
      &lt;!-- jQuery --&gt;
      &lt;script src="js/jquery.min.js"&gt;&lt;/script&gt;
      &lt;!-- Bootstrap --&gt;
      &lt;script src="js/bootstrap.min.js"&gt;&lt;/script&gt;
      &lt;!-- FastClick --&gt;
      &lt;script src="js/fastclick.js"&gt;&lt;/script&gt;
      &lt;!-- NProgress --&gt;
      &lt;script src="js/nprogress.js"&gt;&lt;/script&gt;
      &lt;!-- iCheck --&gt;
      &lt;script src="js/icheck.min.js"&gt;&lt;/script&gt;
      &lt;!-- Datatables --&gt;
      &lt;script src="js/jquery.dataTables.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/dataTables.bootstrap.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/dataTables.buttons.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/buttons.bootstrap.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/buttons.flash.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/buttons.html5.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/buttons.print.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/dataTables.fixedHeader.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/dataTables.keyTable.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/dataTables.responsive.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/responsive.bootstrap.js"&gt;&lt;/script&gt;
      &lt;script src="js/dataTables.scroller.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/jszip.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/pdfmake.min.js"&gt;&lt;/script&gt;
      &lt;script src="js/vfs_fonts.js"&gt;&lt;/script&gt;
  
      &lt;!-- Custom Theme Scripts --&gt;
      &lt;script src="js/custom.min.js"&gt;&lt;/script&gt;
  
    &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here's screenshot of the page: <a href="https://image.ibb.co/eToeaz/Capture.png" rel="nofollow noreferrer">https://image.ibb.co/eToeaz/Capture.png</a></p>