Re: form action problem
| From: | elias | Date: | Tue, 10 Jul 2001 08:16:11 +0000 |
| Subject: | Re: form action problem | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-57096@lists.php.net to get a copy of this message | ||
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>
//elias!
"Brad Wright" <bradwright@optushome.com.au> wrote in message
news:B770D0C7.6D4%bradwright@optushome.com.au...
> Hi all,
> i want to have a submit button on a page that has a php function (on the
> same page) as the action.
>
> ie.
>
> <form name="form1" method="post" action="<?PHP functionA()
> ?>" >
>
> <input type="submit" name="Submit" value="Use functionA">
> </form>
>
> so when the 'Use functionA' button is pressed, the function 'functionA() '
> is called (using php variables already defined before the form.)
>
> Thanks
> Brad
>