pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
passing variable between cgi
5+ messages / 5 participants
[nested] [flat]

* passing variable between cgi
@ 1999-03-01 15:05  hoelc <hoelc@pd.jaring.my>
  0 siblings, 3 replies; 5+ messages in thread

From: hoelc @ 1999-03-01 15:05 UTC (permalink / raw)
  To: pgsql-interfaces

Hello,
I am setting up PostgreSQL (postgresql-6.4.2) database in Linux (Linux 2.0.27)
system, and want to access the database with cgi ( C program) through Apache
(version 1.1) server.  My application involve a few cgi programmes.
I can not figure out how to pass varibles between cgi programmes.

My application involve some thing like this:
    In a HTML page, when the user click a button, a cgi program will run and get
some data from Postgres, then when the user click another button, the other cgi
will be triggerred to process certain data got by the previous cgi, so, I will
need to pass the data get by the first cgi to the second cgi according to the
user choice ...

I am using the embedded SQL (ecpg) method to write the cgi ( C program ) to get
data from postgresql-6.4.2.
How should I pass variable between these C program?  What are the common methods
to develop this kind of application?
Please advice.
Thank you.
LCH





^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: passing variable between cgi
@ 1999-03-01 15:30  nagib hobeica <nag@beryte.com>
  parent: hoelc <hoelc@pd.jaring.my>
  2 siblings, 0 replies; 5+ messages in thread

From: nagib hobeica @ 1999-03-01 15:30 UTC (permalink / raw)
  To: hoelc <hoelc@pd.jaring.my>; +Cc: pgsql-interfaces


Hi,

One common approach is to use the "input type=hidden" tag.
i.e. The output from your first CGI would have
 INPUT TYPE=hidden Name=NameOfTheVar VALUE=ValueAssignedToVar
 within the second click button form.
This information will be hence available to your second CGI.

hope it helps,

nag

PS: a CGI mailing list would be more appropriate
 


On Mon, 1 Mar 1999, hoelc wrote:

> Hello,
> I am setting up PostgreSQL (postgresql-6.4.2) database in Linux (Linux 2.0.27)
> system, and want to access the database with cgi ( C program) through Apache
> (version 1.1) server.  My application involve a few cgi programmes.
> I can not figure out how to pass varibles between cgi programmes.
> 
> My application involve some thing like this:
>     In a HTML page, when the user click a button, a cgi program will run and get
> some data from Postgres, then when the user click another button, the other cgi
> will be triggerred to process certain data got by the previous cgi, so, I will
> need to pass the data get by the first cgi to the second cgi according to the
> user choice ...
> 
> I am using the embedded SQL (ecpg) method to write the cgi ( C program
> ) to get data from postgresql-6.4.2. How should I pass variable
> between these C program?  What are the common methods to develop this
> kind of application? Please advice. Thank you. LCH
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to majordomo@vger.rutgers.edu
> 




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* RE: [INTERFACES] passing variable between cgi
@ 1999-03-01 17:15  Dave Page <dpage@vale-housing.co.uk>
  0 siblings, 0 replies; 5+ messages in thread

From: Dave Page @ 1999-03-01 17:15 UTC (permalink / raw)
  To: pgsql-interfaces

When the first CGI program is run and generates the second HTML page with
the second form on it, have it include some form fields of type 'hidden'.
The values of these fields would be the data you wish pass to the second
cgi.

You can then retrieve the data in the same way as you do for your other
fields when the form is submitted.

Shameless plug: Check out libcgi at http://www.vale-it.demon.co.uk/freeware
for a relatively easy way to get the form data.

HTH

Dave.

--
Dave Page, Network & Systems Manager, The Vale Housing Association Ltd.
dpage@vale-housing.co.uk
http://www.vale-housing.co.uk (Work)
http://www.vale-it.demon.co.uk/ (Home of pgAdmin)
Beer can be a permanent solution - but only if you have enough of it!


> -----Original Message-----
> From: owner-pgsql-interfaces@postgreSQL.org
> [mailto:owner-pgsql-interfaces@postgreSQL.org]On Behalf Of hoelc
> Sent: 01 March 1999 15:06
> To: linux-net@vger.rutgers.edu; PostgreSQL Interfaces
> Subject: [INTERFACES] passing variable between cgi
>
>
> Hello,
> I am setting up PostgreSQL (postgresql-6.4.2) database in
> Linux (Linux 2.0.27)
> system, and want to access the database with cgi ( C program)
> through Apache
> (version 1.1) server.  My application involve a few cgi programmes.
> I can not figure out how to pass varibles between cgi programmes.
>
> My application involve some thing like this:
>     In a HTML page, when the user click a button, a cgi
> program will run and get
> some data from Postgres, then when the user click another
> button, the other cgi
> will be triggerred to process certain data got by the
> previous cgi, so, I will
> need to pass the data get by the first cgi to the second cgi
> according to the
> user choice ...
>
> I am using the embedded SQL (ecpg) method to write the cgi

> C program ) to get
> data from postgresql-6.4.2.
> How should I pass variable between these C program?  What are
> the common methods
> to develop this kind of application?
> Please advice.
> Thank you.
> LCH
>
>
>




^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: [INTERFACES] passing variable between cgi
@ 1999-03-01 18:55  Michael Meskes <Michael_Meskes@topmail.de>
  parent: hoelc <hoelc@pd.jaring.my>
  2 siblings, 0 replies; 5+ messages in thread

From: Michael Meskes @ 1999-03-01 18:55 UTC (permalink / raw)
  To: hoelc <hoelc@pd.jaring.my>; +Cc: pgsql-interfaces; linux-net@vger.rutgers.edu

On Mon, Mar 01, 1999 at 11:05:49PM +0800, hoelc wrote:
> I am using the embedded SQL (ecpg) method to write the cgi ( C program ) to get
> data from postgresql-6.4.2.
> How should I pass variable between these C program?  What are the common methods
> to develop this kind of application?

You mean how to exchange data between two simultanous running C programs?
There are several ways: shared memory, pipes, etc.

Or did I miss something. I fail to see how this relates to postgresql resp.
ecpg.

Michael
-- 
Michael Meskes                         | Go SF 49ers!
Th.-Heuss-Str. 61, D-41812 Erkelenz    | Go Rhein Fire!
Tel.: (+49) 2431/72651                 | Use Debian GNU/Linux!
Email: Michael.Meskes@gmx.net          | Use PostgreSQL!



^ permalink  raw  reply  [nested|flat] 5+ messages in thread

* Re: passing variable between cgi
@ 1999-03-02 06:27  Razvan Marcus <marcus@twf2.twf.ro>
  parent: hoelc <hoelc@pd.jaring.my>
  2 siblings, 0 replies; 5+ messages in thread

From: Razvan Marcus @ 1999-03-02 06:27 UTC (permalink / raw)
  To: hoelc <hoelc@pd.jaring.my>; +Cc: pgsql-interfaces


  You can use <input type=hidden name=... value=...> to pass variables
from a cgi to another.

	Argus 

On Mon, 1 Mar 1999, hoelc wrote:

> Hello,
> I am setting up PostgreSQL (postgresql-6.4.2) database in Linux (Linux 2.0.27)
> system, and want to access the database with cgi ( C program) through Apache
> (version 1.1) server.  My application involve a few cgi programmes.
> I can not figure out how to pass varibles between cgi programmes.
> 
> My application involve some thing like this:
>     In a HTML page, when the user click a button, a cgi program will run and get
> some data from Postgres, then when the user click another button, the other cgi
> will be triggerred to process certain data got by the previous cgi, so, I will
> need to pass the data get by the first cgi to the second cgi according to the
> user choice ...
> 
> I am using the embedded SQL (ecpg) method to write the cgi ( C program ) to get
> data from postgresql-6.4.2.
> How should I pass variable between these C program?  What are the common methods
> to develop this kind of application?
> Please advice.
> Thank you.
> LCH
> 
> 
> -
> To unsubscribe from this list: send the line "unsubscribe linux-net" in
> the body of a message to majordomo@vger.rutgers.edu
> 




^ permalink  raw  reply  [nested|flat] 5+ messages in thread


end of thread, other threads:[~1999-03-02 06:27 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1999-03-01 15:05 passing variable between cgi hoelc <hoelc@pd.jaring.my>
1999-03-01 15:30 ` nagib hobeica <nag@beryte.com>
1999-03-01 18:55 ` Michael Meskes <Michael_Meskes@topmail.de>
1999-03-02 06:27 ` Razvan Marcus <marcus@twf2.twf.ro>
1999-03-01 17:15 RE: [INTERFACES] passing variable between cgi Dave Page <dpage@vale-housing.co.uk>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox