ezhttp
Summary
Returns GET, POST and session variables.Usage
ezhttp( name [, type ] )
Parameters
Name | Type | Description | Required |
---|---|---|---|
name | string | The HTTP variable that should be fetched. | Yes. |
type | string | Source of variable. Default is is HTTP POST. | No. |
Returns
Variable valueDescription
This operator makes it possible to inspect the contents of HTTP variables (POST, GET or session variables). The "type" parameter can be used to specify which type of variable that should be extracted. The following options are available:
- post (POST variable)
- get (GET variable)
- session (session variable)
Examples
Example 1
{ezhttp( 'search' )}
Returns the "search" POST variable.
Example 2
{ezhttp( 'image', 'get' )}
Returns the "image" GET variable.
Example 3
{ezhttp( 'user_id', 'session' )}
Returns the "user_id" session variable.
Balazs Halasy (05/02/2004 10:33 am)
Balazs Halasy (04/05/2005 1:44 pm)
Comments
Warnings
Monday 14 November 2005 10:26:13 am
Bertrand Dunogier
Re: Warnings
Tuesday 28 March 2006 11:27:01 pm
James Robertson
Re: Re: Warnings
Friday 07 April 2006 5:33:09 pm
Patrick Kaiser
{if ezhttp( 'myvar', 'get' ) } => returns false, but throws error
the same with {if is_set( ezhttp( 'myvar', 'get' ) )}
its a bug in my opinion..
Re: Re: Re: Warnings
Wednesday 10 May 2006 4:20:31 pm
xavier dutoit
Why not ?
Tuesday 13 December 2005 6:04:31 pm
Alimi Nabil
Existence of a http variable
Monday 15 May 2006 6:42:43 am
Kristof Coomans
Re: Existence of a http variable
Monday 12 February 2007 9:56:06 am
Anton Hofmann
function getGETp()
{
if(isset($_GET["p"]))
{
return $_GET["p"];
}
return 0;
}