note 110729 added to function.filter-input

From: Date: Wed, 28 Nov 2012 20:30:38 +0000
Subject: note 110729 added to function.filter-input
Groups: php.notes 
Request: Send a blank email to php-notes+get-192179@lists.php.net to get a copy of this message
It's worth noting that the names for variables in filter input obey the same rules as variable naming in PHP (must start with an underscore or letter). We were allowing users to build custom forms but hashing the names to prevent them from putting arbitrary content into the dom. Turns out the hash function occasionally produced entirely numeric values for the field name... which doesn't work with filter_input but worked fine if you read directly from $_GET, $_POST, or $_REQUEST. A workaround is to always prefix an underscore to the field name. ---- Server IP: 69.147.83.199 Probable Submitter: 173.221.82.250 ---- Manual Page -- http://www.php.net/manual/en/function.filter-input.php Edit -- https://master.php.net/note/edit/110729 Del: integrated -- https://master.php.net/note/delete/110729/integrated Del: useless -- https://master.php.net/note/delete/110729/useless Del: bad code -- https://master.php.net/note/delete/110729/bad+code Del: spam -- https://master.php.net/note/delete/110729/spam Del: non-english -- https://master.php.net/note/delete/110729/non-english Del: in docs -- https://master.php.net/note/delete/110729/in+docs Del: other reasons-- https://master.php.net/note/delete/110729 Reject -- https://master.php.net/note/reject/110729 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#192179) next »