note 24228 added to tutorial.forms
| From: | captvanhalen at yahoo dot com | Date: | Sat, 10 Aug 2002 00:20:37 +0000 |
| Subject: | note 24228 added to tutorial.forms | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-34644@lists.php.net to get a copy of this message | ||
And if you want to combine the form and the results in one page, you do something like:
<form method="POST">
Your name: <input type="text" name="name" />
Your age: <input type="text" name="age" />
<input name="go" value="go" type="submit" />
</form>
<?php if ($_POST["go"]) { ?>
Hi <?php echo $_POST["name"]; ?>.
You are <?php echo $_POST["age"]; ?> years old.
<?php } ?>
--
http://www.php.net/manual/en/tutorial.forms.php
http://master.php.net/manage/user-notes.php?action=edit+24228
http://master.php.net/manage/user-notes.php?action=delete+24228
http://master.php.net/manage/user-notes.php?action=reject+24228