basic question
Posted: Tue Jun 09, 2009 8:39 pm
trying to make my first web survey for school.
not sure why .php file does not read variables from client side .htm
using following code snippet to test.
-php file is read and executed but fname and age are blank.
-used GET to test if variables are being passed, they are
not sure why .php file does not read variables from client side .htm
using following code snippet to test.
Code: Select all
//html client side
<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
//php server side
<html>
<body>
Welcome <?php echo $_POST["fname"]; ?>!<br />
You are <?php echo $_POST["age"]; ?> years old.
</body>
</html>
-used GET to test if variables are being passed, they are