I want to be able to pass rows of queried data to rows of input text boxes. As the example below shows, I have come up with this incomplete solution. But this code only passes the data to the first row. I need to be able to pass it to all the rows.
[PHP]
<input type="text" name="prod_id1" ><input type="text" name="qty1">
<input type="text" name="prod_id2" ><input type="text" name="qty2">
<input type="text" name="prod_id3" ><input type="text" name="qty3">
<input type="text" name="prod_id4" ><input type="text" name="qty4">
<input type="text" name="prod_id5" ><input type="text" name="qty5">
<?
$query = "SELECT * FROM product_contain er";
prod_id = $query['prod_id'];
qty = $query['qty'];
?>
[/PHP]
Does anybody have a better solution that what I have come up? Or do you have any other enhancement to this code? Please reply to my post. Thank you.
[PHP]
<input type="text" name="prod_id1" ><input type="text" name="qty1">
<input type="text" name="prod_id2" ><input type="text" name="qty2">
<input type="text" name="prod_id3" ><input type="text" name="qty3">
<input type="text" name="prod_id4" ><input type="text" name="qty4">
<input type="text" name="prod_id5" ><input type="text" name="qty5">
<?
$query = "SELECT * FROM product_contain er";
prod_id = $query['prod_id'];
qty = $query['qty'];
?>
[/PHP]
Does anybody have a better solution that what I have come up? Or do you have any other enhancement to this code? Please reply to my post. Thank you.
Comment