phpfacebookcoldfusiongetrequest

if ($_REQUEST) in Coldfusion


I am trying to use an if statement to check if the user has been directed to this page with from the correct location with correct data.

in php we would use if ($_REQUEST) { ...... }

but how can I do it in coldfusion?


Solution

  • According to this, $_REQUEST is:

    An associative array that by default contains the contents of $_GET, $_POST and $_COOKIE.

    In which case, there is not an equivalent in Coldfusion. The $_GET would be equivalent to CF's URL scope. The $_POST would be equivalent to CF's FORM scope. The $_COOKIE would be equivalent with CF's COOKIE scope. You would need to check the appropriate scope depending on what you are looking for.

    There are, however, frameworks for Coldfusion, such as Coldbox, that manage a "Request Collection" for you.