note 27524 added to tutorial.forms
| From: | steve at brainwashstudios dot com | Date: | Mon, 09 Dec 2002 21:43:12 +0000 |
| Subject: | note 27524 added to tutorial.forms | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-40629@lists.php.net to get a copy of this message | ||
sometimes a way to make your ftp have less files on it you can use the $PHP_SELF function which gets
the current file your using and pops it in
<form action="<? $PHP_SELF ?>" method="POST">
Your name: <input type="text" name="name" />
<input type="submit">
<input name="action" type="hidden" id="action"
value="submit">
</form>
<?php
if($_GET['action']=="submit"){
print ($name);
}
?>
The hidden value sets the var $action on submit telling php to process the form.
Happy coding ;)
--
http://www.php.net/manual/en/tutorial.forms.php
http://master.php.net/manage/user-notes.php?action=edit+27524
http://master.php.net/manage/user-notes.php?action=delete+27524
http://master.php.net/manage/user-notes.php?action=reject+27524