by Peter Tilbrook <peter.tilbrook@[EMAIL PROTECTED]
>
Oct 23, 2006 at 09:38 PM
ultrakit wrote:
> Hi,
> I have an insert page where it will update all form fields on the same
> page and when it is done, it will go to another page as I wish.
>
> I get the insert part no problem but what I want to do is when I do the
> <cflocation> I want to pass the record ID (the one I just insert) with
> it. I've tried giving a name (e.g. promoInsert) to the insert query
> and passing my url as <cflocation
> url="confirm.cfm?promoID=#promoInsert.promoID#> but i will receive an
> error.
>
> Any help would be appreciated. Thanks in advance.
>
Firstly if using a form - avoid passing values in a URL as it is not
very secure. And if updating a database use CFQUERYPARAM whenever
possible.
Also there is no guarantee that the "last ID" is in fact the the last
recorded inserted. ColdFusion is a multitasking behemoth and this is an
issue you NEED to understand to create scalable and secure applications.
Without going into specifics I recommend you check out www.easycfm.com
for tips in this almost "newbie" but challenging issue.
Or email me directly at peter.tilbrook@[EMAIL PROTECTED]
(and send code sample)
so I can shoot you down and then point you in the right direction.
PT. Years with CFML development? 11. Pu****ng 12 next year lol!