0

I have created a basic html form on my web server, and when submit the form i get the following message for apache:

Not Found

The requested URL /handle_form.php method= was not found on this server.

handle_form.php is there, so it should be handling the form.

heres my codes for both files

<html>
<head>
<title>script</title>
</head>
<body>

<form action="http://localhost/handle_form.php method="post">

<feildset><legend>Enter your information in the form below:</legend>

<p><b>Name:</b> <input type="text" maxlength="40" /></p>

<p><b>Email Address:</b> <input type="text" maxlenth="60" /></p>


<p><b>Comments:</b> <textarea name="coments" rows="3" cols="40">[CODE][/CODE]
</textarea></p>

</feildset>

<div align="center"><input type="submit" name="submit" value="Submit My Information" /></div>

</form>
</body>
</html>

and for the handle_form.php fie:

<html>
<head>
<title>script</title>
</head>
<body>
<?php

$name =$_REQUEST['name'];
$email = $_REQUEST['email'];
$comments = $_REQUEST['comments'];

echo "<p>Thank you, <b>$name</b>, for the following comments: <br />
<tt>$comments</tt> </p>
<p>We will reply to you at <i>$email</i>.</p>\n";


?>
</form>
</body>
</html>

Edited by mike_2000_17: Fixed formatting

4
Contributors
3
Replies
4
Views
7 Years
Discussion Span
Last Post by neilnicky017
0

Perfect. It worked. I still wonder if there is a less 'quick and dirty' way since the <center> tag is not supposed to be used from what I understand. I heard something about it being deprecated or not validating when used in conjunction with PHP (not that the code on the page validates well ).

0

I have created a basic html form on my web server, and when submit the form i get the following message for apache:

handle_form.php is there, so it should be handling the form.

heres my codes for both files

<html>
<head>
<title>script</title>
</head>
<body>

<form action="http://localhost/handle_form.php method="post">

<feildset><legend>Enter your information in the form below:</legend>

<p><b>Name:</b> <input type="text" maxlength="40" /></p>

<p><b>Email Address:</b> <input type="text" maxlenth="60" /></p>


<p><b>Comments:</b> <textarea name="coments" rows="3" cols="40">[CODE][/CODE]
</textarea></p>

</feildset>

<div align="center"><input type="submit" name="submit" value="Submit My Information" /></div>

</form>
</body>
</html>

and for the handle_form.php fie:

<html>
<head>
<title>script</title>
</head>
<body>
<?php

$name =$_REQUEST['name'];
$email = $_REQUEST['email'];
$comments = $_REQUEST['comments'];

echo "<p>Thank you, <b>$name</b>, for the following comments: <br />
<tt>$comments</tt> </p>
<p>We will reply to you at <i>$email</i>.</p>\n";


?>
</form>
</body>
</html>

end quote.

  • Finally i found this through google

Edited by mike_2000_17: Fixed formatting

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.