note 51449 added to reserved.variables

From: Date: Thu, 31 Mar 2005 03:37:52 +0000
Subject: note 51449 added to reserved.variables
Groups: php.notes 
Request: Send a blank email to php-notes+get-87229@lists.php.net to get a copy of this message
I'm constantly stymied by the fact that unchecked checkboxes are "silent" in PHP's request variable arrays. Then I realised an additional hidden variable could be used like this: <input type="hidden" name="fish" value="0" /> <input type="checkbox" name="fish" value="1" /> I am a fish. If the checkbox is checked, the new value (1) should overwrite the hidden variable; if not, the hidden variable acts as a default. Should this work in all cases? ---- Manual Page -- http://www.php.net/manual/en/reserved.variables.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51449 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51449&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51449&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51449&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51449&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51449&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51449&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#87229) next »