RE: [PHP] forms
| From: | David Freeman | Date: | Tue, 14 Jan 2003 02:41:48 +0000 |
| Subject: | RE: [PHP] forms | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-131502@lists.php.net to get a copy of this message | ||
G'day CJ
> This is really a html more than a php question.
Yep, it probably is...
> Is it possible to have two buttons and have different
> actions for each button in the same form?
Yep, you can.
<form etc>
<input type="submit" name="first_submit_action" value="do
this">
<input type="submit" name="2nd_submit_action" value="do that">
</form>
When you process your form in php you'll find that you have either
$first_submit_action or $2nd_submit_action set to a value (well, if you
have register global on anyway).
So, you look for which one is set and act accordingly.
Works for me...
CYA, Dave