note 28388 added to tutorial.forms
| From: | elisa at rack1 dot php dot net | Date: | Sat, 11 Jan 2003 06:48:27 +0000 |
| Subject: | note 28388 added to tutorial.forms | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-41993@lists.php.net to get a copy of this message | ||
just a quick note to follow up on the comments of steve at brainwashstudios dot com (9th dec 2002)
and nathan at blackmarketsales dot com (18th dec 2002).
the hidden field seems unnecessary. the script can be simplified by getting rid of <input
type="submit"> and then substituting "hidden" by submit. like this;
<form action="<? $PHP_SELF ?>" method="GET">
Your name: <input type="text" name="name" />
<input name="action" type="submit" id="action"
value="submit">
</form>
<?php
if($_GET['action']=="submit"){
print ($name);
}
?>
the result is exactly the same. : )
elisa
--
http://www.php.net/manual/en/tutorial.forms.php
http://master.php.net/manage/user-notes.php?action=edit+28388
http://master.php.net/manage/user-notes.php?action=delete+28388
http://master.php.net/manage/user-notes.php?action=reject+28388