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>

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 ).

By the look of the code you have a missing quote mark to end the action in the line

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

I can only see three quote marks not four...

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
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.