Hello everybody,

I have a form with a cancel button. When the user hits
the cancel button, I want to perform a sql delete..
immediately after that I want to redirect the user.

Here is the code:

<cfif isDefined("form.CANCELLOCK") and form.CANCELLOCK
eq 1>
<cfquery datasource="db" name="qDel">
delete from table1
where
lvalue ='12345'
</cfquery>

<cfoutput>
<cflocation
url=""> addtoken="no">
</cfoutput>
</cfif>

When I run this code and hit the 'cancel' button...
the sql delete does not delete the row from the table.

However if I remove the cflocation tag from the code
and run it again, it deleted the row from the table.

I'm not able to figure out why it is doing this. Can
anybody help please

Best regards,
cfcoder


__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - Send 10MB messages!
http://promotions.yahoo.com/new_mail
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to