Kbase P83191: How to read CGI environment variables in Webspeed?
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  11/08/2004 |
|
Status: Unverified
GOAL:
How to read CGI environment variables in Webspeed?
FACT(s) (Environment):
Webspeed 3.x
FIX:
The following sample code outputs all CGI variables:
/* this code can run in Scripting lab */
DEF VAR vi AS INT.
def var vc as char.
/* delimiter character for CGI var list is 255 */
def var vcdel as char.
vcdel = chr( 255 ).
do vi = 1 to NUM-ENTRIES( WEB-CONTEXT:CURRENT-ENVIRONMENT, vcdel ) :
vc = ENTRY( vi, WEB-CONTEXT:CURRENT-ENVIRONMENT, vcdel ).
{&out} vc "<br>".
end.
/* sample code ends here */
To get the value of HTTP_MYCGI check the variable name within the list with something like:
IF ENTRY( 1, vc, '=' ) = "HTTP_MYCGI" THEN
my_val = ENTRY( 2, vc, '=' ).