Re: Best way to test for form submission?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Shawn McKenzie wrote:
> Adam Jimerson wrote:
>> This question might give away the fact that I am a php noob, but I am
>> looking for the best way to test for form submission in PHP.

[..]

> Just to throw it into the mix:
> 
> if(!empty($_POST)) for a general test of whether any form was posted.

There are more methods, I always use:

if($_SERVER["REQUEST_METHOD"] == "POST") {

    do_something();

}


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


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux