From a TableC in MySQL using PHP I need to construct a pull-down
in a multi-part form, allow selection and then pass the elements to other
pages as variables. Noobie is going crazy trying to display, accept selection
and get variables to process. I can get one to display and pass but not all.
What am I doing wrong? I only want to display C_Desc in the pull-down, but pass
all four.
Columns of interest that need to be passed from TableC:
CID = int (unique row id)
C_Desc = char (human intelligble text)
CKID1 = int (foriegn key1)
CKID2 = int (foriegn key2)
The dbconnect and query are straight forward and work fine.
Results of the query are in the array named result1.
Displaying the form is fine too! Here is a sample framework of
the form, with a php code I have used to process single value,
what/how can I display C_Desc for
selection, and then pass all four elements????:
<html stuff ... php includes to process queries and php stuff>
<html stuff for display of form ...>
<form NAME="frmRunFCAT" ACTION="TQuery3.php" method="post">
<B>Catalog Choices</B>
<SELECT NAME="sel_cat">
<OPTION Value=" ">All</OPTION> <!-- default -->
<?php
while ($row = mysql_fetch_array($result1, MYSQL_ASSOC))
{
while (list ($key,$value) = each ($row) )
{
echo "<option value=",$value,">";
echo $value;
}
echo "</option>";
}
?>
</select>
<BR>
< more html ...
<input type="submit" value="PROCESS">
</form>
</html and other tags completed>
Any and all suggestions will be appreciated. Thanks to all,
TBull