puremindquietheart

benjie php

Aug 9th, 2018
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.67 KB | None | 0 0
  1. foreach($sql as $row){
  2.                   $variable[] = $row["ReservedQTY"];
  3.                   echo "
  4.                    <tr>  
  5.                      <td>".$row['brand_name']."</td>
  6.                      <td>".$row['model_name']."</td>
  7.                      <td>".$row['ReservedQTY']." /
  8.                                <input type='number' max='100' min='0' name='quantity".$row['model_id']."'
  9.                                  id='quantity".$row['model_id']."' class='".$row['model_id']."' value='0'
  10.                                style='width: 60px; height: 30px;'>
  11.                      </td>
  12.                      <td>
  13.                              <button type='button' id='add".$row['model_id']."' class='btn btn-default label-success'
  14.                                onclick=\"addQty(".$row['model_id'].")\"><i class='fa fa-plus'></i>
  15.                              </button>
  16.  
  17.                              <button type='button' id='minus".$row['model_id']."' class='btn btn-default label-danger'
  18.                                onclick=\"minusQty(".$row['model_id'].")\"><i class='fa fa-minus'></i>
  19.                              </button>
  20.                      </td>
  21.                    </tr>
  22.                  ";
  23.                 }
  24.                   // $sum = array_sum($variable);
  25.                   // echo $sum;
  26.               } catch (PDOException $e) {
  27.                 echo $e->getMessage();
  28.               }
  29.               echo "</tbody></table>";
  30.               echo "<div class='modal-footer'><button class='btn btn-primary btn-sm edit btn-flat'
  31.              data-sales_id='".$row['sales_id']."'><i class='fa fa-check'></i> Confirm</button></div>";
  32.             }
Add Comment
Please, Sign In to add comment