Re: Re: Form Submission

From: Date: Tue, 06 Jul 2004 13:37:08 +0000
Subject: Re: Re: Form Submission
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-189792@lists.php.net to get a copy of this message
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. */

« previous php.general (#189792) next »