Here is some original code, vars are a bit different but much the same idea:
$sql="SELECT * FROM pointsTable
WHERE "`catCode` = 'A'"
ORDER BY point_id ASC";
$result=mysql_query($sql,$dblink);
echo "<ol>";
while($row = mysql_fetch_array($result)) {
echo '<option value='.$row['point_type' , 'pointamt' , 'amt_type' , 'pointCount' ].'>' . $row['pointName'] .
'</option>';
} // end while($row = mysql_fetch_array($result))
echo "</ol>";
?>
</SELECT></P>
I don't know if this is correct or not. I decided to just SET the catCode = "A" instead of using a dropdown for this. It seemed easier for this form. So now based on the catCode, only Points with that code should show up in the dropdown list.
I have other fields in the form that are set at the beginning of the script such as recID, date, nick(based on sessionID, etc) all of which go in as "hidden on the form.
I'm confused on how to set the fields for $results(or is it $row) picked up from the drop down table. Each field has a similar yet just a tad different name in the records table than what they have in the Points table.
I don't want these tables linked for viewing data. I know someone will probably suggest that but I have various reasons for this choice. They are only used to help get the correct fields into the records table with as little decision making by the user as possible.
Thanks again in advance,
Barb