the form will automatically come with their own value (extract from database), but when user make changers on the text box and radio button, and click submit, the new changers value suppose to be save in database.
My text box field doing that, but my radio button have problem to save the new value changed by user,
the value at database still hold the last value not the new one. Here is my radio button coding :
<tr>
<td height="50"><b>WORK SATISFACTION</b></td>
<td> : </td>
<td colspan="5">
<cfoutput>
<input type="radio" name="workSatisfaction" id="workSatisfaction" value="#qStuD.e_wsatisfaction#"<cfif qStuD.e_wsatisfaction EQ '1'>Checked</cfif>> 1
<input type="radio" name="workSatisfaction" id="workSatisfaction" value="#qStuD.e_wsatisfaction#"<cfif qStuD.e_wsatisfaction EQ '2'>Checked</cfif>> 2
<input type="radio" name="workSatisfaction" id="workSatisfaction" value="#qStuD.e_wsatisfaction#"<cfif qStuD.e_wsatisfaction EQ '3'>Checked</cfif>> 3
<input type="radio" name="workSatisfaction" id="workSatisfaction" value="#qStuD.e_wsatisfaction#"<cfif qStuD.e_wsatisfaction EQ '4'>Checked</cfif>> 4
<input type="radio" name="workSatisfaction" id="workSatisfaction" value="#qStuD.e_wsatisfaction#"<cfif qStuD.e_wsatisfaction EQ '5'>Checked</cfif>> 5
<input type="radio" name="workSatisfaction" id="workSatisfaction" value="#qStuD.e_wsatisfaction#"<cfif qStuD.e_wsatisfaction EQ '6'>Checked</cfif>> 6
<input type="radio" name="workSatisfaction" id="workSatisfaction" value="#qStuD.e_wsatisfaction#"<cfif qStuD.e_wsatisfaction EQ '7'>Checked</cfif>> 7
<input type="radio" name="workSatisfaction" id="workSatisfaction" value="#qStuD.e_wsatisfaction#"<cfif qStuD.e_wsatisfaction EQ '8'>Checked</cfif>> 8
<input type="radio" name="workSatisfaction" id="workSatisfaction" value="#qStuD.e_wsatisfaction#"<cfif qStuD.e_wsatisfaction EQ '9'>Checked</cfif>> 9
<input type="radio" name="workSatisfaction" id="workSatisfaction" value="#qStuD.e_wsatisfaction#"<cfif qStuD.e_wsatisfaction EQ '10'>Checked</cfif>> 10
</cfoutput>
</td>
</tr>
and here is my update query coding :
<cfif isDefined ("Form.btnSubmit")>
<cfquery name="qeDitAlumni" datasource="#Application.fw.Config.DSN#">
UPDATE stu_Alumni
SET
stu_contactno = <cfqueryparam value = '#Form.hp#' cfsqltype = "cf_sql_char">,
stu_email = <cfqueryparam value ='#Form.Email#' cfsqltype = "cf_sql_char">,
stu_status = <cfqueryparam value ='#Form.StatUs#' cfsqltype = "cf_sql_char">,
stu_nationality = <cfqueryparam value = '#Form.Nationality#' cfsqltype = "cf_sql_char">,
stu_add1 = <cfqueryparam value = '#Form.Add_1#' cfsqltype = "cf_sql_char">,
stu_add2 = <cfqueryparam value = '#Form.Add_2#' cfsqltype = "cf_sql_char">,
stu_postcode = <cfqueryparam value ='#Form.postkoD#' cfsqltype = "cf_sql_char">,
stu_district = <cfqueryparam value = '#Form.District#' cfsqltype = "cf_sql_char">,
stu_state = <cfqueryparam value = '#Form.State#' cfsqltype = "cf_sql_char">,
e_posts = <cfqueryparam value = '#Form.Posts#' cfsqltype = "cf_sql_char">,
e_organization = <cfqueryparam value = '#Form.Orgnzn#' cfsqltype = "cf_sql_char">,
e_add_1 = <cfqueryparam value = '#Form.AddE_1#' cfsqltype = "cf_sql_char">,
e_add_2 = <cfqueryparam value = '#Form.AddE_2#' cfsqltype = "cf_sql_char">,
e_postcode = <cfqueryparam value = '#Form.postcodE#' cfsqltype = "cf_sql_char">,
e_district = <cfqueryparam value = '#Form.District_E#' cfsqltype = "cf_sql_char">,
e_state = <cfqueryparam value = '#Form.State_E#' cfsqltype = "cf_sql_char">,
e_workstatus = <cfqueryparam value = '#Form.WorkStatus#' cfsqltype = "cf_sql_char">,
e_telno = <cfqueryparam value = '#Form.TN#' cfsqltype = "cf_sql_char">,
e_faxno = <cfqueryparam value = '#Form.FN#' cfsqltype = "cf_sql_char">,
e_monthlysalary = <cfqueryparam value = '#Form.monthLySalary#' cfsqltype = "cf_sql_char">,
e_wsatisfaction = <cfqueryparam value = '#Form.workSatisfaction#' cfsqltype = "cf_sql_char">, <!---here--->
fs_add1 = <cfqueryparam value = '#Form.FSadd1#' cfsqltype = "cf_sql_char">,
fs_add2 = <cfqueryparam value = '#Form.FSadd2#' cfsqltype = "cf_sql_char">,
fs_resultObtain = <cfqueryparam value = '#Form.FS_result#' cfsqltype = "cf_sql_char">,
fs_start_study = <cfqueryparam value = '#Form.FS_start#' cfsqltype = "cf_sql_char">,
fs_end_study = <cfqueryparam value = '#Form.FS_end#' cfsqltype = "cf_sql_char">,
editdate = <cfqueryparam value = '#Form.EditDate#' cfsqltype= "cf_sql_timestamp">
WHERE studentcode = '#url.edit#'
</cfquery>
<cfscript>
Application.fw_Notice("Student details is successfully edit <br> press <a href=index.cfm?section=Alumni&action=ListinG>| finish |</a>.");
</cfscript>
</cfif>
no error popup for this code, but the problem is "radio button" not function for getting the new changes value (extract value from the database its working).

New Topic/Question
Reply



MultiQuote




|