Method Not Allowed The requested method POST is not allowed for the URL /rob.html.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Rob

    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=$_PO ST["firstname"];
    $lastname=$_POS T["lastname"];
    $phone=$_POST["phone"];
    $mobile=$_POST["mobile"];
    $besttimetocall =$_POST["besttimetocall "];
    $city=$_POST["city"];
    $bizname=$_POST["bizname"];

    if (!isset($_POST['submit'])) {


    ?>

    <html>
    <head>
    <title>Contract er INFO</title>
    </head>
    <body>
    <form action="rob.htm l" 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"><b r>
    Mobile:<input type="text" size="30" maxlength="30" name="mobile">< br>
    Best Time To Call:<input type="text" size="30" maxlength="30"
    name="besttimet ocall"><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, ".$firstnam e." ".$lastname.".< br>;
    echo "We will get back to you at ".$phone.";

    }

    ?>
  • Pedro Graca

    #2
    Re: Method Not Allowed The requested method POST is not allowed for the URL /rob.html.

    Rob wrote:[color=blue]
    > Method Not Allowed The requested method POST is not allowed for the
    > URL /rob.html.[/color]
    ^^^^^^^^

    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!

    Comment

    • Default User

      #3
      Re: Method Not Allowed The requested method POST is not allowed for the URL /rob.html.

      Rob wrote:
      [color=blue]
      > 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[/color]
      [color=blue]
      > <form action="rob.htm l" method="post">[/color]


      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

      Comment

      Working...