php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #9357 PHP won't use the method "post"
Submitted: 2001-02-20 16:15 UTC Modified: 2001-05-21 06:55 UTC
From: webmaster at scoutprovidence dot com Assigned:
Status: Closed Package: Unknown/Other Function
PHP Version: 4.0.4pl1 OS: Windows 98 (client side) UNIX (s
Private report: No CVE-ID: None
 [2001-02-20 16:15 UTC] webmaster at scoutprovidence dot com
The following script is supposed to send a simple feedback form, and send it directly to my mail server, however when I submit a test form, it will say "The requested method POST is not allowed for the URL /feedback.php.", when I did exactly what the instruction book (Que) told me to do. 

<html>
<?php_track_vars


$to = $HTTP_POST_VARS["to"];
$head = $HTTP_POST_VARS["eMail"];
$subj = $HTTP_POST_VARS["subject"];
$body1 = $HTTP_POST_VARS["name"];
$body2 = $HTTP_POST_VARS["type"];
$body3 = $HTTP_POST_VARS["comments"];

mail($to, $subj, $body1 . $body2 . $body3, $header);

?>
<head>
<title>Sending...</title>
<script type="javascript">

parent.location="http://www.scoutprovidence.com/thanks.shtml"

</head>
<body>
<font size=3 face=verdana><b>Please wait while your information is being sent...</b></font>
</body>
</html>

As you can see I tried using the <?php_track_vars thing, which still won't work, and I've tried various variations of that tag. What is wrong? Unfortunately I don't have the php.ini file, because the server is third-party (DotEasy).

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-21 06:55 UTC] cardinal@php.net
This script should be generating a parse error.
<?php_track_vars isn't a valid opening tag, that should've generated a parse error.

Try something simple without any Javascript in it:

<form method="post" action="<?= $PHP_SELF ?>">
<input type="hidden" name="variable" value="Post test">
<input type="submit">
</form>
<br><br>Posted variables:
<pre><? print_r($HTTP_POST_VARS) ?></pre>

If that doesn't work, reopen or ask one of the support mailing lists for assistance

http://www.php.net/support.php
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 13:01:30 2024 UTC