Where is form.update being set?
You have the form named update, but no field in that form named update.
On Dec 17, 2007 8:54 AM, Scott Williams <[EMAIL PROTECTED]> wrote:
> hello all,
>
> I am having problems updating records. Listed below is the code that I
> have on 2 pages (update.cfm and update_process.cfm). When I try to
> update the records, it displays the update_process.cfm page, but none of
> the records are updated.
>
> Any help would be appreciated.
>
> Thanks,
> Scott
>
>
> UPDATE.CFM
>
> <cfquery name="getTicket" datasource="helpdesk">
> SELECT ticket_ID, date_created, employee, category, description,
> tech
> FROM tickets
> WHERE ticket_ID = <cfqueryparam value="#url.ticket_id#"
> cfsqltype="cf_sql_numeric">
> </cfquery>
>
> <cfoutput query="getTicket">
> <form action="update_process.cfm" method="post" name="update">
> <input type="hidden" name="ticket_ID" value="#getTicket.ticket_ID#">
> <table align="center" width="" border="0" cellspacing="2"
> cellpadding="2">
> <tr>
> <td align="right"><b>Date Created:</b></td>
> <td align="left">#getTicket.date_created#</td>
> </tr>
> <tr>
> <td align="right"><b>Employee:</b></td>
> <td align="left">#getTicket.employee#</td>
> </tr>
> <tr>
> <td align="right"><b>Category:</b></td>
> <td align="left">#getTicket.category#</td>
> </tr>
> <tr>
> <td align="right"><b>Description:</b></td>
> <td align="left">#getTicket.description#</td>
> </tr>
> <tr>
> <td align="right"><b>Tech:</b></td>
> <td align="left">#getTicket.tech#</td>
> </tr>
> <tr>
> <td align="right"><b>Resolution:</b></td>
> <td align="left"><textarea NAME="resolution" ROWS="3" COLS="40"
> wrap="soft"></textarea></td>
> </tr>
> <tr>
> <td align="right"><b>Date Closed:</b></td>
> <td align="left"><input type="text" name="date_closed"
> value="#DateFormat(now(), "mm/dd/yyyy")#"></a></td>
> </tr>
> <tr>
> <td align="right"><b>Closed:</b></td>
> <td align="left"><input type="text" name="closed" size="1" value="Y"
> maxlength="1"></td>
> </tr>
> <tr>
> <td align="right"></td>
> <td align="left"><input type="submit" value=" Update ">
> </td>
> </tr>
> </table>
> </cfoutput>
> </form>
> ===============================
>
> UPDATE_PROCESS.CFM
>
>
> <cfif isDefined("form.update")>
>
> <cfquery name="update_ticket" datasource="helpdesk" dbtype="ODBC">
> update tickets
> set resolution = '#resolution#',
> date_closed = '#date_closed#',
> closed = '#closed#'
> where ticket_id = <cfqueryparam value="#url.ticket_id#"
> cfsqltype="cf_sql_numeric">
> </cfquery>
>
> The ticket has been updated!
>
> </cfif>
>
> ==============================
>
>
> <mailto:[EMAIL PROTECTED]>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w
Archive:
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:3191
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15