Checkboxe problem

From: Date: Wed, 06 Feb 2002 04:41:01 +0000
Subject: Checkboxe problem
Groups: php.general 
Request: Send a blank email to php-general+get-83673@lists.php.net to get a copy of this message
I have a form with 1 checkbox and have coded it like this: <input type=checkbox name=private> When the form is submitted, $HTTP_POST_VARS[private] only exists IF checkbox is checked. It doesn't exist otherwise, which is causing a problem because there are several other elements before and after. What happens is the value AFTER "private" is actually populating "private" if "private" is empty (not checked). I am, no doubt, missing something small, but critical here. Can someone point out the error of my ways and explain how to get the checkbox key/value pair into the post vars array when the value is not checked? TIA, -- Gaylen PHP KISGB v3.22 Guest Book http://www.gaylenandmargie.com/phpwebsite/

« previous php.general (#83673) next »