Run Update Query when the OK button is clicked, not when the page loads..
I have an Insert Form like so:

with <form method="post" id="form2" action="<cfoutput>#Request.KT_escapeAttribute(Request.KT_getFullUri())#</cfoutput>">
<input type="submit" data-mini="true" name="Insert1" id="Insert1" value="OK" />
I also need to run the following Update Query if the User clicks on OK..
---------------------------------------------------------------------
<!--- Update the Status to Rejected in the tbltickets table --->
<cfquery datasource="care">
UPDATE tbltickets
SET ttstatus=<cfqueryparam value="Rejected" cfsqltype="cf_sql_varchar">
WHERE ttNum=<cfqueryparam cfsqltype="cf_sql_varchar" value="#url.id#">
</cfquery>
- If I add this second query in the head of the page, it runs fine..
- But I need it to only run when the OK button is clicked, not when the page loads..