KhalidRana
New member
I have made two forms. One named 'basic.html' as under:
<html>
<body>
<form action="response.php" type="get">
Name: <input type="text" name="name">
<input type="submit" value="Submit Me">
</form>
</body>
</html>
and the second form 'response.php' as under: -
<html>
<body>
<?
$name = $_GET["name"];
echo $name . ", ";
echo " You are welcome";
?>
</body>
</html>
I want that when a user enters his name in the 'basic.html' form and clicks the submit button, the 'response.php' page should give the response as appending whatsoever name has been entered by the user before the sentence 'you are welcome'. But, what is actually happening is that when I enter the name 'David' on the page 'basic.html' and press enter, the next page is displayed but blank and in the browser's address bar, following is written: -
"file://localhost/C:/apache-tomcat-6.0.18/webapps/PHP/response.php?name=David".
I have kept both of the forms in the same folder.
Please help me if there is any technical mistake. I am trying but could not find where and what is wrong.
<html>
<body>
<form action="response.php" type="get">
Name: <input type="text" name="name">
<input type="submit" value="Submit Me">
</form>
</body>
</html>
and the second form 'response.php' as under: -
<html>
<body>
<?
$name = $_GET["name"];
echo $name . ", ";
echo " You are welcome";
?>
</body>
</html>
I want that when a user enters his name in the 'basic.html' form and clicks the submit button, the 'response.php' page should give the response as appending whatsoever name has been entered by the user before the sentence 'you are welcome'. But, what is actually happening is that when I enter the name 'David' on the page 'basic.html' and press enter, the next page is displayed but blank and in the browser's address bar, following is written: -
"file://localhost/C:/apache-tomcat-6.0.18/webapps/PHP/response.php?name=David".
I have kept both of the forms in the same folder.
Please help me if there is any technical mistake. I am trying but could not find where and what is wrong.