When you encrypt the userid and want to place it on a url, use URLEncodedFormat().
When you want to place it on a form, use HTMLEditFormat(). So something like: <input type="hidden" name="myHiddenField" value="#HTMLEditFormat(myEncryptedString)#"> On a URL, it'd be like: myPage.cfm?userID=#URLEncodedFormat(myEncryptedString)# It sounds like you're receiving the encrypted string through the url and then want to place it in a hidden field: <input type="hidden" name="myHiddenField" value="#HTMLEditFormat(url.myEncryptedString)#"> This will escape any characters that cause problems within form fields, like quotes and brackets. When the form is submitted, the characters will be unescaped automatically. -----Original Message----- From: Jason Dowdell [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 5:29 AM To: CF-Talk Subject: RE: RE: Encrypting Numeric ID's My original question was this... I need to encrypt a numeric userid that gets passed through a url and through a form and is used in a query. The urlencodedformat string that gets passed through the url and set in a form hidden field was messing up the page design because it had a double quote in it. I was looking for a solution that would match all of the above requirements. 1. pass through a url safely 2. pass through a form safely 3. be encrypted based on a key (done) Thanks guys, Jason -----Original Message----- From: Matt Robertson [mailto:[EMAIL PROTECTED]] Sent: Friday, April 19, 2002 2:57 AM To: CF-Talk Subject: RE: RE: Encrypting Numeric ID's I believe the original post was about how to encrypt and then escape a string, not just escape it. 2 functions in and then out seems necessary to get that done, but I'd be happy to see a shorter route. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 18, 2002 3:59 PM To: CF-Talk Subject: Re: RE: Encrypting Numeric ID's Yes, but why bother doing all this work when htmlEditFormat() does all this for you? ______________________________________________________________________ Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists