Skip to the content
Documentation

ezhttp_hasvariable

No ratings yet

Summary

Returns TRUE if the specified HTTP variable is set.

Usage

ezhttp_hasvariable( variable [, method ] )

Parameters

Name Type Description Required
variable string The name of the variable that should be checked. Yes.
method string Source of varialbe, default is HTTP POST. No.

Returns

TRUE if the specified HTTP variable is set, FALSE otherwise.

Description

This operator makes it possible to check if an HTTP variable (GET, POST or session) specified using the "variable" parameter is set. The "method" parameter can be used to specify which type of variables the system should check (default is POST variables); the following options are available:

  • post (POST variable)
  • get (GET variable)
  • session (session variable)

Examples

Example 1
{ezhttp_hasvariable( 'user_id', 'session' )}

Returns TRUE if the "user_id" session variable is set.

Contributors

Comments

Add a comment

Comments are read by a moderator before they appear.