[ back to toc ]

Transferring data from one cgi script to another

Date: 2002/02/27 10:23

Q:
I have a cgi script, "entry.cgi", which has four "value" fields,
"data_entry{'one'}", "data_entry{'two'}", etc.

How do I transfer these values to another script, "print.cgi"?

Thank you
A:
There are several ways. It all depends on what you want to achieve. You
can send a form as the result of entry.cgi that has action print.cgi and
has all the values in the hidden input fields.

You can send a Location header to redirect to print.cgi and have the
values in the GET parameter following the ? mark.

You can send to the client from entry.cgi in cookies.

You can store the values in a file or a database, and print.cgi can
retrieve it from there.

I advise you that you can tell me the issue that you really want to solve
and I may tell you which is the best suitable solution for the specific
problem.

Regards,
Peter

[ back to toc ]