[Solved] How to change mysql column from html table with php scripting


1) You need to use ajax.
2) For every button you can use a form such as:

  <form method="post" action="approved.php" target="_self">
        <td>
            <input type="submit" name="submit" value="Approved">
            <input type="hidden" name="quoteID" value="<?php echo $row["quote_id']?>'>
        </td>
   </form>

approved.php:

  mysqli_connect
  $approvedElement = $_POST['quoteID'];
  $query = 'UPDATE ... WHERE `Quote ID` = \''.$quoteID.'\' ';
  mysqli_query($query);

So before ajax I suggest you to learn basics about GET and POST methods.
In this example you need:

 • form, to redirect the user to another page (approved.php, rejected.php)
 • $_POST, in the second page to retrieve the ID of the approved element, and use it in the next step 
 • mysql_query, after you have correctly coded the query and successfully connected to the           DB 

1

solved How to change mysql column from html table with php scripting