Hi..
I am attempting create a program to allow me to create Purchase orders. In a database i have a list of products and supplying companies. The idea is I choose a company on page 1, click submit and it gives me a list of products that realte to that company, PLUS I include a check bos against each returned line, Plus a text box that will allow me to enter in what quantity of the said product I require. The problem being I will want to order numerous items from the Supplier.
I have created the list using the below all within a form
$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='$textfield[$vol]'> $APref\n </td><td> <input type='text' name='textfield' value1='$vol'> </td><td>$APcode</td><td> $APname </td></tr>\n";
}
echo "</table>\n"; ?>
I click submit to take my choices the the next page (Which I will eventually use to update the PO database).
When I have made my choices I click to move to the next screen where I have the following script.
echo "<table border=1>";
foreach ( $_POST[interest] as $field => $value)
{
echo"<tr><td>$field</td><td>$value</td></tr>";
}
echo "</table>";
The OUtput gives me a table
column 1 I get the row number that I chose (which is good) Column2 prints the word ' ON' (not good).. What I want is the Volume I ordered in the text box. But for the life of me I don't get it..
After two days reading and trying to get my head around it I have decided to ask.
What do I need to do to achieve my goal.
Andy