I have an HTML table which I populate from database using a button. I want to get all the values from the table and send them to a php file to store each row in the database using Javascript when a button is clicked. I thought of using a SESSION variable instead of javascript in order to do this but I am not sure this is the best way to do it and I have no idea where to start.
I hope someone can help me, thanks.
this is the table code if it helps:
<table id="dgvDetalleFactura" class="table table-condensed table-hover table-striped" width="60%" cellspacing="0" data-toggle="bootgrid">
<thead>
<tr>
<th data-column-id="IDProducto" data-type="numeric" data-identifier="true">Código</th><!--Editable-->
<th data-column-id="NombreProducto">Producto</th>
<th data-column-id="Cantidad">Cantidad</th> <!--Editable-->
<th data-column-id="Precio">Precio</th><!--Editable-->
<th data-column-id="UnidadMedida">Medida</th>
<th data-column-id="Impuesto">Imp.</th>
<th data-column-id="Descuento">Desc.</th> <!--Editable-->
<th data-column-id="Total">Total</th>
<th data-column-id="commands" data-formatter="commands" data-sortable="false">Opciones</th> <!--Columna de acciones de borrado-->
</tr>
</thead>
</table>