Re: Posted form values - checkbox problem

From: Date: Mon, 18 Dec 2000 22:07:19 +0000
Subject: Re: Posted form values - checkbox problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-30941@lists.php.net to get a copy of this message
Hello Michael, Monday, December 18, 2000, 13:51:27 PM, you wrote: MK> <input type="checkbox" name="cow"> MK> <input type="checkbox" name="pig"> MK> <input type="checkbox" name="dog"> MK> If cow is 'checked', I get $cow="on", MK> but if cow is left unchecked, I get $cow="". MK> If I knew the names of the variables I was MK> getting, I could check to see if they were 'on' or '', MK> but I don't know. I'm getting an array of disparate MK> values, and I can't tell which checkboxes were on MK> or off, only those that were on. MK> Any ideas, short of including a separate hidden value that MK> tells me which variable names I'll be getting? I am sure I am missing something .. but the control 'name' is the var name. You know you have a checkbox called cow, pig and dog so you will have vars $cow, $pig and $dog... yes? wait a minute .. am i on candid camera? <g> -- DSig David Tod Sigafoos mailto:dsig@teleport.com Using 'The Bat' 1.48 Beta/11 ````` ( O O ) _______oOOo__( )__oOOo_______

« previous php.general (#30941) next »