function detalle(item_id){
}
<thead>
<tr>
<th>Código</th>
<th>Nombre</th>
<th>Fabricante</th>
<th>Tipo</th>
<th><center>Gramos</center></th>
<th><center>Precio</center></th>
<th>
<center>Acciones</center>
</th>
</tr>
</thead>
<?php foreach($items as $it): ?>
<tr>
<td><?= $it['item_code']; ?></td>
<td><?= $it['item_name']; ?></td>
<td><?= $it['item_brand']; ?></td>
<td><?= $it['item_type_desc']; ?></td>
<td><?= $it['item_grams']; ?></td>
<td><?= $it['item_price']; ?></td>
<td>
<center>
<button onclick="detalle('<?= $it['item_id']; ?>');" type="button" class="btn btn-warning btn-xs">Editar</button></center>
</td>
</tr>
<?php endforeach; ?>
I have that, a foreach that shows the items, stored in a database.
What I do not know, is how I do when I click on the detail button I send a new page showing the details of that row, clicked. I'm trying to do something inside the function detail in javascript but they have not worked, since I do not handle much javascript. I'm waiting for your help