Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach($sql as $row){
- $variable[] = $row["ReservedQTY"];
- echo "
- <tr>
- <td>".$row['brand_name']."</td>
- <td>".$row['model_name']."</td>
- <td>".$row['ReservedQTY']." /
- <input type='number' max='100' min='0' name='quantity".$row['model_id']."'
- id='quantity".$row['model_id']."' class='".$row['model_id']."' value='0'
- style='width: 60px; height: 30px;'>
- </td>
- <td>
- <button type='button' id='add".$row['model_id']."' class='btn btn-default label-success'
- onclick=\"addQty(".$row['model_id'].")\"><i class='fa fa-plus'></i>
- </button>
- <button type='button' id='minus".$row['model_id']."' class='btn btn-default label-danger'
- onclick=\"minusQty(".$row['model_id'].")\"><i class='fa fa-minus'></i>
- </button>
- </td>
- </tr>
- ";
- }
- // $sum = array_sum($variable);
- // echo $sum;
- } catch (PDOException $e) {
- echo $e->getMessage();
- }
- echo "</tbody></table>";
- echo "<div class='modal-footer'><button class='btn btn-primary btn-sm edit btn-flat'
- data-sales_id='".$row['sales_id']."'><i class='fa fa-check'></i> Confirm</button></div>";
- }
Add Comment
Please, Sign In to add comment