I have this hbs code:
{{#each data2}}
<tr>
<td width="30%"><div class="checkbox">
<label><input type="checkbox" name="data_{{no}}" id="id_produk" value=" {{no}}">{{item}}</label>
</div></td>
<td></td>
<td width="30%"><div>
<label><input type="text" id="id_produk" name="data_{{no}}" class="form-control text-right" placeholder="Qty"></label>
</div></td>
</tr>
{{/each}}
and this router code:
router.post('/save', (req, res, next) => {
var sql = "INSERT INTO transaction (transaction_id, product_id, qty) VALUES ?";
});
I want to submit multiple data to mysql database. How can i achive that ?