T
Ted Byers
I have searched through my books, the FAQs I could find, the CGI
documentation, and have not found the answer, probably just an
oversight in the documentation I have examined.
For the most part, I have found it extremely easy to use the CGI
packages.
My frustration is that, while it is trivially easy to get form
parameters in my CGI scripts, I have not found how to either forward
or redirect the user to the HTML form he had just used to submit the
data my script had just processed. The script is just to move the
data into a DB, send an error page if there is a problem, and
otherwise return the user to the form ready to enter more data. The
form itself is static, and so exists as a simple HTML file in htdocs
(I'm using Apache's httpd).
I found something about just printing "Location: some_uri", but unless
the sources I read are mistaken, that needs a full path, and, as the
code will be moved from my development machine to a final home, I can
only know the relative path.
I know I could have the contents of the HTML file in the cgi file too,
but that carries its own problems WRT maintenance, and having the
script read the file and then print it carries performance issues.
What is the best option here?
Thanks
Ted
documentation, and have not found the answer, probably just an
oversight in the documentation I have examined.
For the most part, I have found it extremely easy to use the CGI
packages.
My frustration is that, while it is trivially easy to get form
parameters in my CGI scripts, I have not found how to either forward
or redirect the user to the HTML form he had just used to submit the
data my script had just processed. The script is just to move the
data into a DB, send an error page if there is a problem, and
otherwise return the user to the form ready to enter more data. The
form itself is static, and so exists as a simple HTML file in htdocs
(I'm using Apache's httpd).
I found something about just printing "Location: some_uri", but unless
the sources I read are mistaken, that needs a full path, and, as the
code will be moved from my development machine to a final home, I can
only know the relative path.
I know I could have the contents of the HTML file in the cgi file too,
but that carries its own problems WRT maintenance, and having the
script read the file and then print it carries performance issues.
What is the best option here?
Thanks
Ted