Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
Hi,
i have a list of items created dynamically each with an order id,product id got from database and in hidden field and batch id which has to be selected from a dropdown menu.Code: Select all
<input type="hidden" name="order_ID" value="<?php echo $order_ID; ?>">
<input type="hidden" name="product_ID" value="<?php echo $product_ID; ?>">
<select name="batch_list[<?php echo $i; ?>]"><option value="">Select</option>
<?php
$result2 = mysql_query("SELECT * FROM tbl_batch");
while($row2 = mysql_fetch_array($result2))
{
?>
<option value="<?php echo $row2[0]; ?>"><?php echo $row2[0]; ?></option>
<?php
}
$i++;
}
mysql_close($con);
?>
</select>Im getting the batch id correctly but i get the order id and product id of last item only.
How to get the correct values?
feyd | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]