[client_params_9]

Description

Link: [client_params_9]
Author: Jolle Carlestam
Category: Client
Version: 9.x
License: Public Domain
Posted: Oct. 13, 2009
Updated: Nov. 10, 2010
More by this author...

Returns a static array of GET/POST parameters passed from the client. An optional param "method" can direct it to return only post or get params.

New version 2010-11-11 based on same code as action_params but without the inline sensing parts.

Parameters

-method string, optional Returns only get or post params if defined

Sample Usage

client_params;
client_params('post');
client_params(-method = 'get');
						

Source Code

Click the "Download" button below to retrieve a copy of this tag, including the complete documentation and sample usage shown on this page. Place the downloaded ".inc" file in your LassoStartup folder, restart Lasso, and you can begin using this tag immediately.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?LassoScript
/**!
client_params
Returns a static array of GET/POST parameters passed from the client.
An optional param "method" can direct it to return only post or get params
Example usage:
client_params;
client_params('post');
client_params(-method = 'get');


**/
define client_params(method::string = '') => {
/*
	2010-11-11	JC	New version based on same code as action_params but without the inline sensing parts.
*/

	if (web_request)
		#method == 'get' ? return web_request -> queryParams
		#method == 'post' ? return web_request -> postParams

		return tie(web_request -> queryParams, web_request -> postParams) -> asStaticArray
	/if
	return staticarray
}

define client_params(-method::string = '') => client_params(#method)


?>

 

Related Tags



Comments

none

Email:


Password:



Newest

Most Popular

Support tagSwap.net