Re: Calling functions from Button actions
| From: | Daniel Souza | Date: | Sat, 13 Sep 2003 16:59:19 +0000 |
| Subject: | Re: Calling functions from Button actions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-162503@lists.php.net to get a copy of this message | ||
<?
function func1()
{
}
function func2()
{
}
function func3()
{
}
function func4()
{
}
function func5()
{
}
if (isset($_REQUEST['funcs']))
foreach ($_REQUEST['funcs'] as $key=>$val)
if (function_exists($key))
$key();
?>
<hr>
<form method=POST>
<input type=submit name=funcs[func1] value="Execute Function 1"><br>
<input type=submit name=funcs[func2] value="Execute Function 2"><br>
<input type=submit name=funcs[func3] value="Execute Function 3"><br>
<input type=submit name=funcs[func4] value="Execute Function 4"><br>
<input type=submit name=funcs[func5] value="Execute Function 5"><br>
</form>