Re: checking $_POST variables

From: Date: Fri, 14 Mar 2003 19:38:17 +0000
Subject: Re: checking $_POST variables
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-139758@lists.php.net to get a copy of this message
> That's generally not a good idea because depending on the type of control > empty input fields will not be available in the $_POST array (e.g. > unchecked checkboxes are _not_ sent by the browser). > > You should rather have a list of input variables that need to be filled and > compare $_POST against this. I'd agree with this, but just in case this is an absolute necessity, and a sure thing, have you tried: foreach($_POST as $key=>$value) { ... } I haven't tried that, but it may work.

« previous php.general (#139758) next »