Page 1 of 1

Submitting to a database (help!)

Posted: Fri Jul 12, 2002 8:21 am
by mpho
Im writing code for a message board system and get the following error when trying to submits postings:

HTTP Error 405:

405 Method not allowed.

The Method specified in the Request Line is not allowed for the resource identified by the request. Please ensure that you have the proper MIME type set up for the resource you are requesting.

I'm posting as follows:

<FORM method=post action="<?php echo PHP_SELF ?>">

Please Help

Posted: Fri Jul 12, 2002 9:31 am
by BDKR
Hmmm? Based on your code, I'm suprised you're not seeing a parse error as I don't see a ";" on the end of that echo.

Is there a way to verify that PHP_SELF is being properly echo'ed in the HMTL? Look at the source before pressing the submit button and see what form tag looks like.

Hope that helps,
BDKR (TRC)

Posted: Fri Jul 12, 2002 11:30 am
by RandomEngy
Try $PHP_SELF and $_SERVER['PHP_SELF'] instead of PHP_SELF.

Posted: Fri Jul 12, 2002 12:20 pm
by mikeq
BDKR wrote:Hmmm? Based on your code, I'm suprised you're not seeing a parse error as I don't see a ";" on the end of that echo.

Is there a way to verify that PHP_SELF is being properly echo'ed in the HMTL? Look at the source before pressing the submit button and see what form tag looks like.

Hope that helps,
BDKR (TRC)
The last line within any <?PHP ?> tags does not require a ;

Try it yourself, take off the very last ; in any of your scripts, but having said that I think it good programming pratice to include all ;

Mike

Posted: Fri Jul 12, 2002 3:43 pm
by BDKR
That is strange! I never would've thought that.

But oh well.....

Later on,
BDKR