Advertisements

getRequestParam

Definition:
function getRequestParam($name, $default_value = false) {}

Returns an request value by name without magic quoting.

Parameters

  • String $name: Name of parameter to get.
  • String $default_value: Default value to return if value not found.

Return values

returns:request value by name without magic quoting or default value.

Source code

function getRequestParam($name, $default_value = false) {

	if (!isset($_REQUEST[$name]))

		return $default_value;



	if (is_array($_REQUEST[$name])) {

		$newarray = array();



		foreach ($_REQUEST[$name] as $name => $value)

			$newarray[$name] = $value;



		return $newarray;

	}



	return $_REQUEST[$name];

}

1110

Advertisements

No comments yet... Be the first to leave a reply!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: