Link to home
Start Free TrialLog in
Avatar of phantem
phantem

asked on

Going to a page without using URL queries...

Hi all,

I've got a large table of items, use, cost, generated by a CF query. when i click on one of them, a new page opens up with details on that item.

something like:
<a href="ItemDetail.cfm?ID=#ID#"Item 1</a>

What I'd like to do is open the detail page while hiding the ID number. -- I don't want people to be able to jump to another item by randomly guessing IDs.

How might I go about doing this?
Avatar of cheekycj
cheekycj
Flag of United States of America image

you can try this:

<form action="ItemDetail.cfm" method="post">
<input type="hidden" id="#id#">
<input type="image" src="images/itemdetailimage.jpg">
or use a submit button
<input type="submit" value="Item Details">
</form>

for each item.

Now in your ItemDetail.cfm you will need to change the code to read FORM.id instead of URL.id

CJ
ASKER CERTIFIED SOLUTION
Avatar of cheekycj
cheekycj
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of phantem
phantem

ASKER

CJ..

it's giving me an error:
decryptedID = Decrypt(URL.ID, "test")

Error resolving parameter URL.ID

??
Chris

you are still passing the id via the URL right?

CJ
Avatar of phantem

ASKER

yeah- looks great in URL section of the browser...

just seems to be having trouble with the decrypt function.
Avatar of phantem

ASKER

Ok... figured out that one...
The example I gave you was generalized... my actual URL variable name is 'NameProper' I was using URL.ID. Switched the itemdetail to Decrypt(URL.NameProper, "test") and that error disappeared...

Now, its giving me:

An unexpected system error was detected. (Error code is 20)

This type of error will most likely occur when the server running ColdFusion is low on memory and/or system resources.
If you continue to experience this error in a reproducible fashion you should contact Allaire technical support.
Avatar of phantem

ASKER

Ok... figured out that one...
The example I gave you was generalized... my actual URL variable name is 'NameProper' I was using URL.ID. Switched the itemdetail to Decrypt(URL.NameProper, "test") and that error disappeared...

Now, its giving me:

An unexpected system error was detected. (Error code is 20)

This type of error will most likely occur when the server running ColdFusion is low on memory and/or system resources.
If you continue to experience this error in a reproducible fashion you should contact Allaire technical support.
I am not sure about that one.. I have never encountered that error before.. I will see if I can dig something up.

CJ
Avatar of phantem

ASKER

Found the problem... er... found a solution

something to do with URLEncodedFormat...

http://cfhub.com/faq/encrypt.cfm

Works now. thanks for pointing me in the right direction.

Chris
aah, missed that one.

glad you got it working.