Passing associated values with selected item in CFFORM?
I query a database for names and different grades for subjects. For example, I requested for "Mary" and the database returns more than one "Mary". So I displayed the different "Mary" with a cfform and list all the "Mary" with a radio button and let user choose the right "Mary".
e.g.
cfquery...
if more than one student with same name then
<cfform action="nextprogram">
<cfoutput query=list>
<cfinput type=radio name=studentname value=#studentname#>#studentname#, #studentlastname#
<cfinput type=hidden name=math value=#math#>
<cfinput type=hidden name=physic value=#physic#>
....
</cfoutput>
</cfform>
Of course, I realize this will not work because if there are 10 "Mary" and I select the first "Mary", the application will not know which math, physic grades etc. belong to the first "Mary". Since I have already done the database query with all the information retrieved, I don't want to do a database query again. How do I pass the all the information belong to the chosen "Mary" to the "nextprogram"? This is probably very easy to do with different CF tag, but I haven't used Coldfusion for a while, so any help is appreciated. Thank you.
Jack
