I'm a newbie. I tried to call file 2 from file 1 and tried to print the name and age, but I'm not able to do it. I think I'm right in code. Can someone help me?
File 1
Code: Select all
<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>
Code: Select all
<html>
<body>
Welcome <?php echo $_POST["fname"]; ?>!<br />
You are <?php echo $_POST["age"]; ?> years old.
</body>
</html>