Frank Heckenbach wrote:
Rick Engebretson wrote:
Ernst-ludwig Bohnen wrote:
On Sun, 3 Apr 2005, Andy Ball wrote:
How do I read an environment variable from my gpc Pascal program? This should enable me to accept data input via a form on the Web.
Try predefined function GetEnv in unit gpc.pas: function GetEnv (const EnvVar: String): TString; Ernst-Ludwig
I might be entirely wrong here. But I seem to recall you are working on CGI programming.
My guess is "Environment Variable" means different things when referring to shell programs such as bash or tcsh, or when referring to httpd programs such as Apache.
Not really -- CGI programs get some of their information via environment variables (that's why it's possible to write limited CGI programs in bash using $FOO). Other data (e.g. from POST requests) are sent via stadard input however.
BTW, I also have a working CGI unit ready in http://fjf.gnu.de/misc/cgiprogs.tar.bz2 (which supports both GET and POST requests, and internally uses environment variables and standard input as necessary, of course).
Frank
Yes really -- I recalled the young man had posted before on CGI forms. Forms environment variables are different than shell variables. Since then he was more specific.