This content has been marked as final. Show 4 replies
Use list functions. The url is a nested list. The outer list has an ampersand delimiter and the inner lists have an equal sign delimiter.
> I have a page (not on my server) that links to a page on my server.
> This URL has several variables that I want to grab and use on my page. The
> URL looks like this:
> By using cgi.HTTP_REFERER I am able to display the URL, but I am having
> trouble parsing out the variables to use later on the page.
> How do I "grab" the values of id, isbn, and volume from this URL?
> Thank you for your help.
Most of us would use url.id, url.isbn and url.volume. You could also
use url['id'], url['isbn'] and url['volume'] if you like on any version
of ColdFusion released this century.
<cfdump var="#url#"> may also be informative.
I.E. you are working to hard if you are trying to parse
cgi.http_REFERER. ColdFusion has already done this and dumped
everything into the URL structure. Of course, if I was going to use a
CGI variable, I would use cgi.query_string and parse as nested lists.
But is 'test.cgi' a ColdFusion template?
Thank you both for your replies!
The referring page is not a CF page, so i guess I will need to parse the URL using cgi.query_string. I will look for information on how to do that since I have never used that before.
> Thank you both for your replies!
> The referring page is not a CF page, so i guess I will need to parse the URL
> using cgi.query_string. I will look for information on how to do that since I
> have never used that before.
> Thanks again!
The referring page has nothing to say about this. If the page on your
server is a CFML page, then the URL variables will be in the URL
structure. ColdFusion handles this behind the scenes whenever a request
is made, no matter where the request comes from, ColdFusion doesn't care.