Re: php form and ssi



Henrik Carlqvist escribió:
<form method="post" action="">

Thanks for the tip. Unfortunately with action="" I get the same result as
with action=\"$_SERVER["REQUEST_URI"]\", that is I get an error message
saying:

405 Method Not Allowed
The requested method POST is not allowed for the URL /form_test.shtml.

This looks like the web server is configured to reject POST requests in such URL. Do you have a <Limit ...> directive somewhere in your Apache config?


Is it possible to pass form data to a php script through an .shtml
file? I would prefer a solution where the .shtml file doesn't need to
have any knowledge about the data it passes to the php file.
I can't understand why you can't simply get rid of SSI but I suppose
you'll have your reasons.

In my case my reason is phpoi, available at http://phpoi.sourceforge.net/
. Phpoi consists of a number of php scripts. Their html output doesn't
look much to the world, but the php scripts are meant to be used by
different people who can include them from .shtml pages with other
contents and designs.

Today it all works great except for the administration php scripts which
uses forms and once the forms are used they have to escape from any
.shtml-page with an action=\"$_SERVER["PHP_SELF"]\".

Whether you stick to SSI or switch to PHP, check the following documentation:

http://es2.php.net/virtual
http://httpd.apache.org/docs/2.2/mod/mod_include.html




--
-- http://alvaro.es - Álvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programación web: http://bits.demogracia.com
-- Mi web de humor al baño María: http://www.demogracia.com
--
.