Copy link to clipboard
Copied
Hello
this code
<p>Available Subject for this semester:
<select name="listsubject">
<option value="other" selected>Select one</option>
<cfloop query="qGetUsrDistrict">
<option value="#qGetUsrDistrict.Subject_Name#">#qGetUsrDistrict.Subject_Name#</option>
</cfloop>
</select>
was from
<cfquery name="qGetUsrDistrict" datasource="#Variables.fw.Config.DSN#">
SELECT * FROM subject
</cfquery>
and i want to insert it into another cfm page, called register.cfm..
<cfquery name="qUpdateSubject" datasource="#Variables.fw.Config.DSN#">
INSERT INTO Data
(Subject_Code, Subject_Name, Student_Name, Semester, RegistrationDate)
VALUES ('a',
'z',
'#listsubject#',
'#Variables.fw.User.Sem#',
'#DateFormat(Now())#')
</cfquery>
my objective is to insert the data from 2 tables... '#Variables.fw.User.Sem#' works fine but how do we called the another variable #listsubject#' ???
plz help, thanks
Copy link to clipboard
Copied
really easy actually but i have no idea what happen to my machine ...i already tried that but not working
just add #form.listsubject# ..
thanks anyway
-Naz