Good afternoon, I needed help with a topic. I bring the data from an api with curl in php which I keep in an array and that's perfect, I show the data in a table and in that table I have a input button
which I need to click, send me the position of the selected array to pedido.php
, which receives the array and shows it in a table. I leave a bit of code to see if you can give me a hand. A greeting
Table
<td>
<img src="<?php echo $valor['foto'] ; $i++ ;?>" border='0' width='50' height='50' onmouseover="this.width=500;this.height=500" onmouseout="this.width=50;this.height=50">
</td>
<td><?php echo $valor['descripcion']; ?></td>
<td><?php echo $valor['familia'] ;?></td>
<td><?php echo $valor['codigo'] ;?></td>
<td><?php echo $valor['descripcionadicional']; ?></td>
<td><?php if ($valor['precio1'] <= 0) echo "Sin disponibilidad"; else echo $valor['precio1']; ?></td>
Button
<input
type="button"
class="button" method="POST"
value="Agregar a pedido"
name="Agregar"
id ="Agregar"
title="Agregar"
onclick="my()"
/>