Deutsch English
Alphabetical index
Array functions
CGI functions
  • cgibuffer()
  • cgiclearbuffer()
  • cgiclosebuffer()
  • cgiexec()
  • cgigetparam()
  • cgigetsession()
  • cgitestparam()
  • cgitestsession()
  • cgiwrite()
  • cgiwritehtml()
  • cgiwriteln()
  • cgiwritetemplate()
  • endcgi()
  • endsema()
  • getquerystring()
  • http_post()
  • initcgi()
  • waitsema()
    Data types
    Date functions
    Debugging
    Fulltext functions
    Language elements
    Numerical functions
    Operators
    Other functions
    Ramtext functions
    Selecting
    Socket functions
    Statistical functions
    Stream functions
    String functions
    System functions
    Table functions
    Text functions
    Home    Overview    Search    Impressum    Contact    Members
    Topic complex CGI functions
    Function cgigetparam()
    Short Gets a paramter from the standard input
    Syntax CGIGETPARAM(ident : STRING):STRING
    Parameter ident : Name of the CGI variable
    Return Value of the CGI variable
    See also:
    cgitestparam() getquerystring() getenv()
    Description The tdbengine works up all informations of the client with starting:

    Informations from the environment variable QUERY_STRING are made available via the function GETQUERYSTRING.

    Information from StdIn are worked up via CGIGETPARAM.

    All results are returned as strings in the character set of the tdbengine.

    The parameter is interpreted case-insensitive.

    Are more than one CGI variables with the same name transmitted, the access happens as follows:

    1. variable xyz -> CGIGETPARAM("xyz")
    2. variable xyz -> CGIGETPARAM("xyz.1")
    3. variable xyz -> CGIGETPARAM("xyz.2")
    etc.

    Cookies play a special role in this context.
    They can get with

    CGIGETPARAM("cookie.xyz").

    At the same time cookies are in the ramtext "ramtext:environment" after GETENV("HTTP_COOKIE")

    Also the HTML type TEXTAREA is transmitted via the standard input.
    But the access to this should not happen via CGIGETPARAM, because firstly there are only 255 chars possible and secondly the system ramtext "ramtext" is overwritten, when the name of such a CGI variable starts with "text".

    Larger textes (in HTML forms) are transmitted to the programm as follows.

    1. The name of the CGI variable (in HTML forms) has to start with "text:", eg. "text:remark".

    2. At the start tdbengine makes a ramtext with the name "ramtext:text:..." available, that includes the whole transmitted text, eg. "ramtext:text:remark".

    The tdbenine supports also the type of transmission "multipart/formdata" and within that also the HTML type "FILE". At the start tdbengine copies the transmitted content of this field (a file) to a temporary file, which path is returned by CGIGETPARAM, eg. "634431234/myfile.gif". This file is deleted automatically when the program is terminated. So if the file is accepted by the program, it has to be copied or put into a BLOB field by the program.

    The capazitiy of file transmission is mostly limited by the http server. Usual is a maximum size of about 100 KByte.

    Easy example for CGIGETPARAM:

    The following input fields are in a HTML form:
    Company: 
    Internet:

    These fields are filled by the user:

    Company: My Company
    married: (is ticked off)

    Then CGIGETPARAM returns:

    CGIGETPARAM("company") -> "My Company"
    CGIGETPARAM("married") -> "1"

    Example 1: CGITestSession



    VAR SessionID : STRING
    VAR SessionTest : INTEGER
    ...
      SessionID:=CGIGetParam("sessionid")
      SessionTest:=CGITestSession(SessionID)
      IF SessionTest=0 THEN
         // illegal session because of different IP numbers
      ELSIF SessionTest>3600 THEN
         // TimeOut because this session was valid only for one hour
      ELSE
         // here it is all right
      END
    


    User comments:
    Write a comment:
    Name
    EMail
    Subject
    Text (Switch mode)

    Choose between
    the normal and the
    advanced editor.
    The advanced editor
    runs in IE 5+ and
    Mozilla 1.4+ only
    SPAM-Protection Please enter tdbengine in this field.

    tdbengine chat
    irc.tdbengine.org
    #tdbengine

       Copyright © 2003-2004 tdb Software Service GmbH
       Alle rechte vorbehalten. / All rights reserved
       Last changed: 21.10.2004
    {Fehler für :execmacro{execmacro="sessionspy"}