Re: passing different variables with SUBMIT
| From: | Matt McClanahan | Date: | Thu, 02 Nov 2000 03:21:20 +0000 |
| Subject: | Re: passing different variables with SUBMIT | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-23303@lists.php.net to get a copy of this message | ||
On Wed, 1 Nov 2000, David Kalosi wrote:
> Hello
>
> I know there is a possibility to pass different variables to a php script
> with more SUBMIT buttons
>
> For example I would Have two subbmit buttons one UPDATE adn one DELETE. I
> need to pass a variable telling the script
> if it should generate a update form or a delete form
>
> Can anybody help me?
<form ....>
<input type="submit" name="action" value="Delete">
<input type="submit" name="action" value="Update">
</form>
====
<?
if ($action == 'Delete')
{
// Delete
}
else if ($action == 'Update')
{
// Update
}
Matt