> hmm....do again as:
>
> <?
>   function functionA()
>   {
>     // your function goes here....
>   }
>
>   if (isset($usefunctiona))
>   {
>     functionA();
>   }
> ?>
>
> <html>
> <body>
>  <form name="form1" method="post" action="<?=$PHP_SELF?>" >
>    <input type="submit" name="usefunctiona" value="Use functionA">
>  </form>
> </body>
> </html>

i might try:

<?php

function a()
{
//same idea put function here
}

function b()
{
//same idea put function here
}

if (!empty($func_a)) {
    a($field1);  //this would assume you have passed a variable in the form
to use in the function.
}else if (!empty($func_b)) {
    b($field1);
}

?>

<form name="form1" method="post" action="<?php echo $PHP_SELF ?>" >
<input type="text" name="field" value="insert value to be processed by
function">
<input type="submit" name="func_a" value="true">
</form>

this would also assume you need multiple functions to be used on the same
form as submit buttons. This seems like the most logical/simple way to do
it.

-Adam



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to