This content has been marked as final. Show 5 replies
> I get an error saying that
> the variable could not be found.
You shouldn't get an error saying a CGI-scoped variable was not found. CF
always - for some daft reason - treats any non-existent CGI variable as an
empty string. isDefined() on a CGI variable always returns true.
structKeyExists() is more reliable, though, and will return false if indeed
the variable does not exist.
Originally posted by: Newsgroup User
What's that going to do for me?
CGI.SCRIPT_NAME is the path to the script that is currently executing. When your users "continue to where they wanted to go", the path to the new page becomes the new value of CGI.SCRIPT_NAME, which is in general different from that of the previous page. Could there possibly be some confusion there?
Is there a way to carry the url and variables that it was using at first through all of the pages it has to run through to check the users authentication?
Yes. For example, Coldfusion can carry them from page to page as session, URL or hidden form variables.
CGI.Query_String contains a tokenized list of all of your URL variables (e.g. myvar=1&hello=world). If you would like to learn a little more about what information you have available to you in the CGI variables, simply do a <cfdump var="#CGI#">. That should point you in the right direction.