Refreshing form value after submit
Ok, bear with me as I'm very new to CFML. I have a form that pulls from a cfquery and autofills two form textboxes with the current values from the datasource. User clicks submit and the changed values are made to the table data. The problem I'm having is that after clicking submit, the values in the two textboxes revert back to the old values prior to the edit. Browsing back to the page displays the new information. Any help would be greatly appreciated.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Modify Homepage</title>
</head>
<cfquery name="getleftmenu" datasource="mysql">
SELECT *
FROM homemenu
</cfquery>
<body>
<cfform format="XML" skin="basic">
<cfoutput query="getleftmenu">
<cfformgroup type="vertical">
<cfinput type="text" size="20" length="25" id="menu1label" label="Menu 1 Label:" name="menu1label" value="#getleftmenu.menu1label#" />
<cfinput type="text" size="20" length="25" id="menu1link" label="Menu 1 Link:" name="menu1link" value="#getleftmenu.menu1#" />
</cfformgroup>
</cfoutput>
<cfformgroup type="horizontal" >
<cfinput id="submit" title="Submit" name="submit"
value="Submit" type="submit"
style="margin-left:65px" />
<cfinput id="reset" title="Reset" name="reset"
value="Reset" type="reset" label="Reset" />
</cfformgroup>
</cfform>
<cfif isdefined("form.submit")>
<cfquery name="putleftmenu" datasource="mysql">
UPDATE homemenu
SET menu1label='#form.menu1label#', menu1='#form.menu1link#'
</cfquery>
<cfoutput>Update complete</cfoutput> <br />
</cfif>
</body>
</html>
