"Jason Wong" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> On Tuesday 06 July 2004 17:50, Torsten Roehr wrote:
>
> > > How can I check if a form has been submitted, I have seen a demo that
> > > uses the following:
> > >
> > > if(isset($HTTP_POST_VARS))
> > >
> > > But I understand that $HTTP_POST_VARS is depricated...
> > >
> > > Thanks for your help
> >
> > Check the $_POST superglobal:
> >
> > if (isset($_POST['name_of_your_button'])) {
> > }
>
> It might not be a good idea to rely on the "submit" button to be set. Some
> browsers do not set/send it if you didn't explicitly click on the "submit"
> button. I would use:
>
>   if (!empty($_POST)) { ... }

How do you check which button was pressed (read: which action should be
performed) when using this check?

Regards, Torsten

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to