HI,
I've created a simple login form using HTML and using the POST method for the form. But the values are not getting posted to the next page.
When I try to use get, the url is shown blank(no value is passed ahead).
Can any one give me the solution for this?
Is this the problem of HTML or of PHP?
Please reply back asap.
Thanks.
POST Error
Moderator: General Moderators
Form1.html:
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
<form action="hello.php" method="POSt">
Your first name <input type="text" name="name">
Your favorite color <input type="text" name="color">
<input type="submit" value="Send Info">
</form>
</BODY>
</HTML>
hello.php
Hello
<?php echo $_POST["name"]; ?>,
Your favorite color is <?php echo $_POST["color"]; ?>.
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
</HEAD>
<BODY>
<form action="hello.php" method="POSt">
Your first name <input type="text" name="name">
Your favorite color <input type="text" name="color">
<input type="submit" value="Send Info">
</form>
</BODY>
</HTML>
hello.php
Hello
<?php echo $_POST["name"]; ?>,
Your favorite color is <?php echo $_POST["color"]; ?>.