Hi guys,
Was wondering if anyone can help me with this. Here's what I'm trying to do:
I've retrieved values from table a from mysql and post them on a form.
echo "<tr><td>" .$row['id']. "</td><td>" .$row['name']. "<input type='hidden' name=name[] value=" .$row['name']. "></td><td><select name='item[]'><option value ='' selected='selected'>Please Select</option><option value ='1'>1</option><option value ='2'>2</option><option value ='3'>3</option></td></tr>";
and now i'm trying to display these information one more time on a different page. So I did the usual retrieval
$name = $_POST['name'];
$item = $_POST['item'];
Then I'm using foreach loop to retrieve the item values.
foreach ($item as $getitem => $value)
{
echo "<tr><td>";
echo $value;
echo "</td></tr>";
}
Here is where I'm stumped. What's the best way to associate the name to the item.
while loop?
Thanks for the help.