Re: Query about empty POST arrays
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.php archive

Re: Query about empty POST arrays

From: Justin Koivisto <justin@koivi.com>
Date: Thu Oct 06 2005 - 16:33:37 CEST

chotiwallah wrote:

> Dikkie Dik wrote:
>
>>Thejo wrote:
>>
>>>2. When the user clicks the submit button without entering anything.
>
> then the post array is not empty, the elements just contain empty
> strings. the validation routine of the form data should take care of
> that.

Not true... if the form is made up of all radio buttons and/or
checkboxes (with no default selected) AND the submit button doesn't have
a "name" attribute, $_POST will be empty (as in $_POST=array() type of
empty).

>>Then (if method=post), the submit button itself is ported (it has a name
>>and a value).
>
> careful here, ie does NOT submit the button if the form is submitted
> using the return key.

Most browsers don't because the button wasn't clicked...

-- 
Justin Koivisto, ZCE - justin@koivi.com
http://koivi.com
Received on Tue Oct 18 02:32:44 2005