RE: [PHP] multiple submit buttons
| From: | Jim Carey | Date: | Sat, 25 Nov 2000 07:42:14 +0000 |
| Subject: | RE: [PHP] multiple submit buttons | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-27109@lists.php.net to get a copy of this message | ||
<table cellspacing=0 cellpadding=0 width=235 border=0 mm_noconvert='TRUE'>
<form name=form1 action=test.php3 method=post>
<tr>
<td class=bodytext width=51>Domain :</td>
<td width='184'> <input name=domain
width='133'> </td>
</tr>
<tr>
<td colspan=2>
<br>
<input type=hidden value=$affiliate name=affiliate>
<input type=submit value=deactive name=submit>
<input type=submit value=active name=submit>
</form>
</table>
produces a small table with one input field and two buttons.
then in the test.php3 you can:
if ($submit == "deactive")
{
do my stuff for deactive
}
if ($submit == "active")
{
do my stuff for active
}
Jim Carey
www.OZbcoz.com
Premium Domain Services
> -----Original Message-----
> From: Deepak Chawla [mailto:dchawla@usa.unl.edu]
> Sent: Saturday, 25 November 2000 5:39 PM
> To: php-general@lists.php.net
> Subject: [PHP] multiple submit buttons
>
>
> Hi all,
>
> I need two submit buttons in a html form, and i need them to do two
> different things...eg: a text box for a filename and two submit buttons,
> one for opening the file and another for deleting it. Since both require
> the filename field.. both have to be submit buttons.
> html in itself doesn't provide means for doing this... is there any way
> to do it ??
>
> regards
> -deepak
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>