Prolog CGI Scripts
(ONLY for Professional edition)

String2 is getenv(String1)

returns the environment value of the String1 ( QUERY_STRING, REMOTE_ADDR, HTTP_COOKIE etc.)

String is getenv(post)
returns the value of the form which is submitted using POST method

String2 is get_environment_arg(INT, String1)
returns the Int part of the String1 (all parts of String1 are separated by & or ? signs)

It is usually used to get the value of the submitted fields.

tring3 is get_html_form(INT, String1, String2)
returns the value of the INT field which has the name of String1 from the String2

The difference from get_environment_arg is that here the value is decoded. INT and String1 can be left _ which means default.

set_content_type(String)
sets the content type of the following text (for CGI ONLY) for Example "text/html", "image/jpg" etc.

set_cookie(Field, Path, Expiration)
sets a cookie on the client's browser. The Field contains something like "ID=John" The Path must contain the directory on the server on which files the cookie will be send to. For example "/" sets the cookie to all files from your server. The Expiration must contain the full date when the cookie will expire for example "Monday, 28-Feb-00 10:00:00 GMT". If the Expiration is not set the cookie will expire when the user ends the session.