note 88478 added to function.filter-input-array
| From: | kibblewhite at live dot com | Date: | Mon, 26 Jan 2009 15:35:37 +0000 |
| Subject: | note 88478 added to function.filter-input-array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-149778@lists.php.net to get a copy of this message | ||
If you are trying to handling multiple form inputs with same name, then you must assign the
'flags' => FILTER_REQUIRE_ARRAY to the definitions entry.
Example, you have a html form as such:
<form>
<input name="t1[]" value="Some string One" />
<input name="t1[]" value="Another String Two" />
</form>
Your definitions array will look a little like this:
$args = array(
't1' => array(
'name' => 't1',
'filter' => FILTER_SANITIZE_STRING,
'flags' => FILTER_REQUIRE_ARRAY)
);
----
Server IP: 87.124.35.190
Probable Submitter: 193.252.16.10
----
Manual Page -- http://www.php.net/manual/en/function.filter-input-array.php
Edit -- https://master.php.net/note/edit/88478
Del: integrated -- https://master.php.net/note/delete/88478/integrated
Del: useless -- https://master.php.net/note/delete/88478/useless
Del: bad code -- https://master.php.net/note/delete/88478/bad+code
Del: spam -- https://master.php.net/note/delete/88478/spam
Del: non-english -- https://master.php.net/note/delete/88478/non-english
Del: in docs -- https://master.php.net/note/delete/88478/in+docs
Del: other reasons-- https://master.php.net/note/delete/88478
Reject -- https://master.php.net/note/reject/88478
Search -- https://master.php.net/manage/user-notes.php