When I submit the form, the database is updated properly.
When I cflocation back to the form, form should show updated info instantly. It does. However, the last field does not show updated info, even though Database is updated.
If I push Update again, correct info shows, and if I push Update again old info shows, and so on (like a toggle effect). If I push the browser's "Refresh" button, all is good, I can push the Update button many times and the correct results always show.
This is very strange, none of my co-workers can figure it out either.
The code is below.
<cfquery datasource="IPOFAQ" name="faqlist">
SELECT id, question, questionorder
FROM FAQinfo
Where code = '#changeorderCode#'
order by questionorder
</cfquery>
<form action="admin_FAQchangeorder.cfm?changeorderCode=#changeorderCode#&update=yes" method="post" >
</cfoutput>
<table width="620" border="0" cellspacing="2" cellpadding="4" align="CENTER">
<tr>
<td colspan=2><input type="Submit" value="Update"></td>
</tr>
<cfoutput query="faqlist">
<tr bgcolor="eeeeee" valign="TOP">
<td class="verdsmall" nowrap>
<input type="Text" name="x_#id#" value="#questionorder#" size="3"></td>
<td><font class="verdsmall">#replace(question, chr(10), "<br>", "ALL"
</tr>
</cfoutput>
</table>
</form>
</cfif>
<cfelse>
<cfloop index="i" from=1 to="#listlen(form.fieldnames)#">
<cfoutput>
<cfset varID="#removechars(listgetat(form.fieldnames,i,","
<cfset varQ="#evaluate(listgetat(form.fieldnames,i,","
<cfquery name="qryUpdateList" datasource="ipofaq">
UPDATE faqinfo
set
QuestionOrder= '#varQ#'
Where id= #varID#
</cfquery>
</cfoutput>
</cfloop>
<cflocation url="admin_FAQchangeorder.cfm?changeorderCode=#changeorderCode#">