mark110384 Posted June 17, 2008 Share Posted June 17, 2008 I have a table that is populated by an array via a while loop , the sql brings back details regarding an item, the user is then able to enter a quantity of what they require and then hit the addtotrolley button. My problem is getting the quantity to the form so that i insert the appropriate data into the database. Below is a snippet of the quantity text box and button that are generated via the while loop, at present I can insert the itemId but not the quantity. I know it's a bit confusing but any help or suggestions would be greatly appreciated. <td align="left" width="40"><? echo "<font face = Arial align = left>Qty</font>"; echo "<br><input type='text' name='qty[].$itemid' size='2' title='Enter Quantity' align = 'center'>"; ?></td> <td align="right"><? echo "<input type='image' src='addtotrolley.bmp' border='0' alt='Add' value = '$itemid' name = 'itemid'/>"; ?> </td> Link to comment https://forums.phpfreaks.com/topic/110587-problem-with-recieving-a-value/ Share on other sites More sharing options...
MatthewJ Posted June 17, 2008 Share Posted June 17, 2008 Should $itemid be inside the [] for qty? Only thing I see that looks strange. Link to comment https://forums.phpfreaks.com/topic/110587-problem-with-recieving-a-value/#findComment-567354 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.