PTM Logo Version 0.5.1 Beta
Home    SVN    Downloads    Documentation    Forum    Contact
This Site is 100%
Powered by PTM

SourceForge.net Logo
Documentation
I   Index
II   GNU GPL
III   Description
IV   Installation
V   Language Overview
VI   Tags
VII   Variables
  $_BASE
  $_CGI
  %_COOKIES
  $_DEFAULT_PTM_FILE
  $_DOCUMENT_ROOT
  %_GET
  $_HEADER
  @_KEYWORDS
  $_PATH
  %_POST
  @_PTM
  $_PTM_POS
  $_PTM_PREPROCESS
  @_REQUIRE
  $_SCRIPT
  %_SERVER
  %_SESSION
  %_SET_COOKIES
  $_SYNTAX_...
  $_URL
  $_USE_SECURE_SCRIPT_PASSING
  $_VERSION
VIII   Functions
IX   Modules
Documentation
View / Download this file.
--------------
%_GET VARIABLE
--------------

  -----------
  DESCRIPTION
  -----------

    The %_GET variable stores [generally] HTML form data submitted via the GET
    method, or alternately any "name=value" data appended after a question mark
    (?) in the URL. The exception to this in when there is no field seperation
    via an equals (=) or ampersand (&) in the URL, or the GET input field
    parameter's name is "keywords", in which case values are stored in the
    @_KEYWORDS list/array.

    %_GET is a hash/associative array which stores GET data in name=value pairs
    in the following format:

      %_GET = (
        field1 => 'value1',
        field2 => 'value2',
        field3 => 'value3'
      );

    The %_GET keys (input field names) can be accessed as a list (array) with
    Perl's "keys" command like so:

      @field_names = keys %_GET;

    The field values can be accessed by referencing the specific name of the
    requested field:

      $field_value = $_GET{'field1'};

    Notice that when referencing a specific field value, the '%' is changed to a
    '$' when referencing the hash, as you are referencing a specific value and
    not the entire hash.

    NOTE:
    
      The GET field name "ptm" should NEVER be used, as it is used to tell
      the PPA (PTM Parser Application) [ptm.cgi] which PTM script file to load.

  --------------
  USAGE EXAMPLES
  --------------

    -----------------------------------------------------------------
    Example 1: Showing the Value of a GET Field using the DISPLAY Tag
    -----------------------------------------------------------------

      The value of the Name field is <?= $_GET{'Name'} ?>.

    --------------------------------------------------------------------------
    Example 2: Showing All the Fields using the DO and DISPLAY Tags and a Loop
    --------------------------------------------------------------------------

      <? foreach $field (keys %_GET) { ?>
        The value of the <?= $field ?> field is <?= $_GET{$field} ?>.<br>
      <? } ?>

  --------
  SEE ALSO
  --------

    TAGS

      DO, DISPLAY

    VARIABLES

      @_KEYWORDS, %_SERVER
Home    SVN    Downloads    Documentation    Forum    Contact