Okay heres the problem.
I have a form which displays items that sit within a packet. (In this case its called Wireless Package 1). Each item has its own specific value, which can be any string, hench why there is an 'input type= text' in the value column in the table.
Each of these values is stored in a table, with the primary key 'piid', (show as a hidden field within 3rd column).
The problem is when im posting the array 'values[]' I cant distinguish between what value needs to be referenced againist a piid, how do i obtain these individual ID's and Values in a loop so they can turned into a MySql Strings?????
I tried using an explode function but got no where, any help is very much apprieciated!
This is the code for the form displayed.
<table border="1" cellpadding="5" cellspacing="5">
<tr>
<th>Item ID</th>
<th>Item</th>
<th>Value</th>
<th>Remove</th>
</tr>
<form action="edit_packet.php" method="post">
<?php foreach($packages as $packet):?>
<tr>
<td>
<?php echo $packet['piid'] ;?>
</td>
<td>
<?php echo $packet['desc'] ;?>
</td>
<td>
<input type="hidden" name="values[]" value="<?php echo $packet['piid'];?>,," />
<input type="text" name="values[]" value="<?php echo $packet['value']; ?>" />
<input type="hidden" name="values[]" value="///" />
</td>
<td>
<form action="delete.php" method="post">
<input type="hidden" name="pid" value="<?php echo $packet['piid'];?>"/>
<input type="submit" value="Delete Packet">
</td>
</tr>
<?php endforeach; ?>
</table>
<input type="submit" value="Submit" />
</form>
[attachment deleted by admin]