RE: [PHP-DB] multiple forms, one submit button
| From: | olinux | Date: | Tue, 12 Feb 2002 07:47:41 +0000 |
| Subject: | RE: [PHP-DB] multiple forms, one submit button | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-16847@lists.php.net to get a copy of this message | ||
You could include a hidden variable in each form with a value unique to
each form
- i.e. <INPUT TYPE="hidden" name="form_id" value="1">
in the php script:
if ($form_id == 1) {
-- Process form 1 --
}
elseif ($form_id == 2) {
-- Process form 3 --
}
elseif ($form_id == 3) {
-- Process form 3 --
}
else {
-- $form_id is not set so show the forms --
}
olinux
-----Original Message-----
From: Marius Ursache [mailto:marius.ursache@tm.cit.alcatel.fr]
Sent: Monday, February 11, 2002 11:24 PM
To: php-db@lists.php.net
Subject: [PHP-DB] multiple forms, one submit button
hi
is it posibile to have in a php script multiple forms and only one
submit button? if yes, how you "recover" the submited data?
ex:
<form method="POST" action=$REQUEST_URI name=form1>
bla bbla
</form>
<form method="POST" action=$REQUEST_URI name=form2>
bgf
</form>
<form method="POST" action=$REQUEST_URI name=form3>
gjhdf
<input type="submit" name = "test" value = "lala" >
</form>
tnx
--
Marius Ursache (3563 || 3494)
\|/ ____ \|/
"@'/ ,. \`@"
/_| \__/ |_\
\__U_/
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com