| Author |
Method Not Allowed The requested method POST is not allowed for the URL /rob.html.
|
|
|
| THis is my code. What im trying to accomplish is the user fills out
the form then when they hit submit it displays what the entered on the
samne page but i get this error message when I hit submit
Method Not Allowed The requested method POST is not allowed for the
URL /rob.html.
Here is the code. Any helpis greatly appreciated I cant figure this
out at all i have tried so many different combinations.
<?php
$firstname=$_POST["firstname"];
$lastname=$_POST["lastname"];
$phone=$_POST["phone"];
$mobile=$_POST["mobile"];
$besttimetocall=$_POST["besttimetocall"];
$city=$_POST["city"];
$bizname=$_POST["bizname"];
if (!isset($_POST['submit'])) {
?>
<html>
<head>
<title>Contracter INFO</title>
</head>
<body>
<form action="rob.html" method="post">
First Name:<input type="text" size="30" maxlength="30"
name="firstname"><br>
Last Name:<input type="text" size="30" maxlength="30"
name="lastname"><br>
Phone:<input type="text" size="30" maxlength="30" name="phone"><br>
Mobile:<input type="text" size="30" maxlength="30" name="mobile"><br>
Best Time To Call:<input type="text" size="30" maxlength="30"
name="besttimetocall"><br>
Select your city:<br>
<select name="city">
<option value="Toronto">Toronto</option>
<option value="Markham">Markham</option>
<option value="Barrie">Barrie</option>
</select><br>
buisiness Name:<input type="text" size="30" maxlength="30"
name="bizname"><br>
<input type="submit" value="submit" name="submit">
</form>
<?
echo "Hello, ".$firstname." ".$lastname.".<br>;
echo "We will get back to you at ".$phone.";
}
?>
| |
| Pedro Graca 2004-12-08, 8:57 pm |
| Rob wrote:
> Method Not Allowed The requested method POST is not allowed for the
> URL /rob.html.
^^^^^^^^
Maybe that should be rob.php?
Anyway, I think this is a web server configuration detail.
--
Mail to my "From:" address is readable by all at http://www.dodgeit.com/
== ** ## !! ------------------------------------------------ !! ## ** ==
TEXT-ONLY mail to the whole "Reply-To:" address ("My Name" <my@address> )
may bypass my spam filter. If it does, I may reply from another address!
| |
| Default User 2004-12-08, 8:57 pm |
| Rob wrote:
> THis is my code. What im trying to accomplish is the user fills out
> the form then when they hit submit it displays what the entered on the
> samne page but i get this error message when I hit submit
> <form action="rob.html" method="post">
Most hosts aren't set up with files with .html extensions to be parsed
as php or any other sort of executable. You probably need an extension
like .php or .php4 or something like that. There are ways you can make
the html files parsed, but there's really no need to do that.
Brian
|
|
|
|