convertQueryStringToStruct(querystring)
Last updated December 27, 2013
Version: 1 | Requires: CF8 | Library: DataManipulationLib
Description:
This function accepts a URL query string argument and returns it as a structure.
Return Values:
A struct of query string name/value pairs
Example:
<cfdump var="#convertQueryStringToStruct(querystring=cgi.query_string)#">
Parameters:
Name | Description | Required |
---|---|---|
querystring | Query string to convert | Yes |
Full UDF Source:
<!---
Converts a URL query string to a struct
v1.0 by Chris Weller
v1.1 by Adam Cameron (removing redundant intermediary variables)
@param querystring Query string to convert (Required)
@return A struct of query string name/value pairs
@author Chris Weller (wellercs@gmail.com)
@version 1, December 27, 2013
--->
<cffunction name="convertQueryStringToStruct" access="public" returntype="struct" output="false" hint="I accept a URL query string and return it as a structure.">
<cfargument name="querystring" type="string" required="true" hint="I am the query string for which to parse.">
<cfreturn createObject('java', 'coldfusion.util.HTMLTools').parseQueryString(arguments.querystring)>
</cffunction>
Search CFLib.org
Latest Additions
Raymond Camden added
QueryDeleteRows
November 04, 2017
Leigh added
nullPad
May 11, 2016
Raymond Camden added
stripHTML
May 10, 2016
Kevin Cotton added
date2ExcelDate
May 05, 2016
Raymond Camden added
CapFirst
April 25, 2016