$_POST in php 5.3.5 does not work

Posted by naji on Stack Overflow See other posts from Stack Overflow or by naji
Published on 2011-02-28T02:11:32Z Indexed on 2011/03/10 8:10 UTC
Read the original article Hit count: 260

Filed under:

dear all

iam working in php 5.3.5

this is the html file

<html>
<body>

<form action="welcome.php" method="post">
Name: <input type="text" name="fname" />
Age: <input type="text" name="age" />
<input type="submit" />
</form>

</body>
</html>

and this is the php file

<html>
<body>

Welcome <?php echo $_POST["fname"]; ?>!<br />
You are <?php echo $_POST["age"]; ?> years old.

</body>
</html> 

the problem the values are not passed and the output like

Welcome !
You are years old.

But it has to be like this

Welcome John!
You are 28 years old.

can any one help me please??

naji

© Stack Overflow or respective owner

Related posts about php