Page 1 of 1
Post not working from 1 script to another
Posted: Tue Jun 11, 2002 1:05 am
by jidospod
Well lets see, our server is Apache, and this one directory all the php scripts are renamed for example "register.php" is just "register", (dont ask why its irrelevant), and register POSTs to "checkacct", now my problem here is I cant get this to work, when I try and POST I get a Internal Server Error (500). What can I add to my .htaccess file to make it post to the file.
If I rename to .php they will work fine, however the sysadmin does not want extentions on those files. Please dont tell me I should rename them to .php I KNOW that, but he's adement on having no extentions. Thanks in advance guys.
Posted: Tue Jun 11, 2002 1:25 am
by volka
sorry, no idea, but your sysadmin is working on your
side?

Have you checked the apache's error logs. May be it tries to tell you something (may be not. I got internal errors without error logs

)
Posted: Tue Jun 11, 2002 1:34 am
by jidospod
24.67.xxx.xxx - - [11/Jun/2002:02:13:56 - 400] "POST /checkacct?option=WRITE HTTP/1.1" 405 339 "
http://www.mydomain.com/register" "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt)"
Is what appears in my logfiles...
However, I am at a loss

Posted: Tue Jun 11, 2002 1:52 am
by jidospod
I am using the following line in my register script (which is php) to POST to my checkacct script (also php). Any ideas?
<FORM METHOD=POST ACTION="checkacct?option=CHECK">
Posted: Tue Jun 11, 2002 2:04 am
by volka
You are mixing POST and GET. Form-method is POST but you add '?option=check' which is GET. instead include a
Code: Select all
<input type="hidden" name="option" value="CHECK" />
$_POST['option'] will be available in your script (='CHECK').
Just a few moments ago I tried
<
Location /php>
ForceType application/x-httpd-php
</Location>
in my httpd.conf to treat any file in a directory (../htdocs/php) as php-script and it worked without server errors.
Server Version: Apache/2.0.36 (Win32) PHP/4.2.1
Server Built: May 6 2002 23:31:19