docu CGI handling routines
docu Tested on Linux 2.0.x and Apache 1.x
docu programmed by Hermang Mansilla M. E-mail: hh_mm@yahoo.com

MaxFormItems=12
dim names$(MaxFormItems),value$(MaxFormItems)

export Sub ReadEnviron$ ( variable$)
local cont$, t$, pos, i, qry$, indent
if variable$="" then variable$="QUERY_STRING" fi
indent=len(variable$)+1
qry$=""
cont$= system$("set")
pos=instr(cont$,variable$)
if pos>0 then
	i=0
	LABEL DATOS
	t$=mid$(cont$,pos+indent+i,1)
	if t$<>chr$(10) then 
	qry$=qry$+t$
	i=i+1
	goto DATOS
	fi
else
qry$=""
fi
return qry$
end sub


export sub itemnumber(s$)
local numamp,long,i,t$
numamp=0
long=len(s$)
for i=1 to long
t$=mid$(s$,i,1)
if t$="&" then numamp=numamp+1 fi
next i
return(numamp+1)
end sub


Export Sub GetCgiData(q$)
local var,nombre,i,t$
var=1:nombre=1
for i=1 to len(q$)
t$=mid$(q$,i,1)
if nombre=1 then
            if t$<>"=" then names$(var)=names$(var)+t$
            else nombre=0
            fi
else
            if t$<>"&" then value$(var)=value$(var)+t$
            else nombre=1:var=var+1
            fi
fi
next i
End Sub : REM LeeEnviron

rem LABEL UrlDecode
rem for i=1 to numdata
rem pos=instr(value$(i),"+")
rem mid$(value$(i),pos,1)=" "
rem next i
rem RETURN :REM UrlDecode

rem LABEL Analiza
rem for i=1 to numamp+1 
rem PosBusca=instr(names$(i),busca$)
rem if PosBusca<>0 then valor$=value$(i) fi
rem next i
rem RETURN :rem Analiza


    Source: geocities.com/sunsetstrip/palms/1624/yabasic/libs

               ( geocities.com/sunsetstrip/palms/1624/yabasic)                   ( geocities.com/sunsetstrip/palms/1624)                   ( geocities.com/sunsetstrip/palms)                   ( geocities.com/sunsetstrip)