Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2001-01

CGI-program parameters.

3 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Arne Hanssen

I'm writing a small cgi-program using version 1.0.2 and have a question. My program is called from (Apache) html-page f.eks. like this (platform is Linux, Red Hat 6.2):

<img src="my.cgi?var1=value1&var2=value2">

then ParamStr( 1 ) in my program is blank!

If I change to:

<img scr="my.cgi?var1_value1&var2_value2">

then ParamStr(1) = var1_value1\&var2_value2
(note the backslash - is that to be expected?).

Main "problem"(?) is: Using equal signs (=) in html call seems to destroy program parameter. Is this a bug or am I doing some- thing wrong?

Thanks for any suggestion! ;-)

Vennlig hilsen / Best regards |\ ___,,--, _ Arne Hanssen, Senja, Norway /,`--'' \-,,__,'/ http://home.enitel.no/ahh |,4 ) )_ ) /~-----' http://home.c2i.net/bkgras -----'---^~(_/-_)--(_/_)-------

Reply by email

Michael A. Hess
to Arne Hanssen
Arne Hanssen wrote
I'm writing a small cgi-program

In case you interested there is a class in the FCL that makes this easy. It does require that you write using class mode like Delphi but it is very easy to use. The unit is ezcgi. There is an example of how to use it in the fcl/tests directory, testcgi.pp.

It takes care of all of the problems you are asking about.

==== Programming my first best destiny! ==== Michael A. Hess Miracle Concepts, Inc. http://www.miraclec.com

Reply by email

Georgi Georgiev
--- Arne Hanssen wrote
I'm writing a small cgi-program using version 1.0.2 and have a question.

...

Use the unit uncgi to get the parameters value.
This unit is part of the FreePascal distribution.

=====
Skelet
====== http://skelet.hit.bg

__________________________________________________ Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.com/

Reply by email