Re: initialize variables (was: Using the GET Method)
| From: | Wade | Date: | Mon, 13 Jan 2003 16:30:39 +0000 |
| Subject: | Re: initialize variables (was: Using the GET Method) | ||
| References: | 1 2 | Groups: | php.windows |
| Request: | Send a blank email to php-windows+get-17825@lists.php.net to get a copy of this message | ||
01132003 0826 CST
Ok. This code is right off the PHP.net site. I changed the action="action.php" to action="form.php" only.
But, when I run the page I receive "Hi . You are years old." Only.
Is this because I have global_variables turned off, even through Im using $_post?
Wade
**********
<html>
<head>
<title>PHP Form</title>
<body>
<form action="form.php" method="post">
Your name: <input type="text" name="name" />
Your age: <input type="text" name="age" />
<input type="submit">
</form>
</body>
</html>
************
<html>
<head>
<title>PHP Form</title>
<body>
Hi <?php echo $_post["name"];?>.
You are <?php echo $_post["age"];?> years old.
</body>
</html>