From a list of referances taken from a DB I am attempting to use checkboxes to choose a variaty of products and allocate a volume to them..
However, instead of getting the list of chosen products on page 2 with the volume against it, I get the whole list of products from page 1 with the volumes against the lines I have chosen.
This isn't what I want, I only want to see the information relating to the chosen lines. I could do with some help and may be a little eplanation as I am trying to learn this..
Cheers
Page 1
<form id="form2" name="form2" method="post" action="alipo3.php">
<p> Supplier</p>
<?php
echo "$ASco";
$query1 = "SELECT * FROM ALIPROD WHERE APSup = '$ASco'";
$result1 = mysql_query($query1) or die ("Couldn't get the ASLISUP list");
echo "<table>";
while ($row = mysql_fetch_array($result1))
{
extract ($row);
echo "<tr> <td> <input type='checkbox' name='interest[$APref] value='$APref'> $APref\n </td><td> <input type='text' name='volume[$APref]' > </td><td>$APcode</td><td> $APname </td></tr>\n";
}
echo "</table>\n";
PAGE 2
foreach ( $_POST['volume'] as $field => $value)
{
echo"<tr><td>$field</td><td>$value </td></tr>";
}
The problem being that this coding takes every line on page 1 and shows agains tthe right line the qty. I only want the actual lines I chose..