Good day.. I am struggling with an array which I am hoping to get some advice on.
The concept is that I show a list of items asociated with a job, using the following within a form :-
$query2 = "SELECT * FROM prepop1 WHERE PPjob='$code'";
$result2 = mysql_query($query2) or die ("Couldn't execute quer 19");
while ($row2 = mysql_fetch_array($result2))
{
extract($row2);
echo "<td>$PPqty </td>";
echo "<td>$PPdesc</td>";
echo "<td><input type='text' name='volume' value='$PPqty' maxlength='10' size='10'>
<input type='checkbox' name='interest[$PPcode]' value='$PPcode'>$PPcode
</td></tr>";
}
On the next page I show the choices using the the following :-
foreach ($_POST[interest] as $field => $value )
{
echo "$value <br>";
}
For all of the checkbox's I chose I get the list of $PPcode no problem.
My problem is that I want to move more information per choice. for example I show a text box on the first page where I would want the ser to identfy a value, I want to show this value against the relevant choices I make.
I have tried an umber of ideas but as a result either get the word ARRAY appear OR the last number in the list. I am assuming that what I need to do is associate the Number in the text box with the array but I am buggered if I can work this bit out..
Can some one help..
cheers Andy