Forum Moderators: phranque
When passing data in a GET statement, I know that you can use the "URL." prefix before variables in the <CFOUTPUT> tag and you get the same results without it.
So, if my Cold Fusion variable is called "color", what is the advantage of using #URL.color# as opposed to just #color#?
1. You should refer to it as #url.color# so that when you come back to read your code at some later date, you will know that you are using the GET value there, as opposed to some other variable you defined.
2. I think if you define a variable called color before you use #color#, it will return the vaue you defined, as opposed to the GET value. #url.color# will always return the GET value.
You should definitely do it even if #2 is not true, because you want to make your code as clear as possible for whoever is going to be reading it in five months.