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)) { ... } -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Style may not be the answer, but at least it's a workable alternative. */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php