summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/libraries/input.rst
diff options
context:
space:
mode:
authorAhmad Anbar <aanbar@gmail.com>2015-01-11 18:39:06 +0100
committerAhmad Anbar <aanbar@gmail.com>2015-01-11 18:39:06 +0100
commitc8e1de74b139dc7f3e776f7ebf98495ec5b780a6 (patch)
tree51709a1855d570ba495d81a172a029015341c2bd /user_guide_src/source/libraries/input.rst
parentfaa4890addbaa90254ef160813a08f727d069415 (diff)
parent99f31e76bd06876cd3bf789f9d2774f79818b7df (diff)
Merge remote-tracking branch 'upstream/develop' into develop
Diffstat (limited to 'user_guide_src/source/libraries/input.rst')
-rw-r--r--user_guide_src/source/libraries/input.rst28
1 files changed, 21 insertions, 7 deletions
diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst
index 112347129..4464e0fdc 100644
--- a/user_guide_src/source/libraries/input.rst
+++ b/user_guide_src/source/libraries/input.rst
@@ -17,6 +17,10 @@ The Input Class serves two purposes:
<div class="custom-index container"></div>
+***************
+Input Filtering
+***************
+
Security Filtering
==================
@@ -49,6 +53,10 @@ this::
Please refer to the :doc:`Security class <security>` documentation for
information on using XSS Filtering in your application.
+*******************
+Accessing form data
+*******************
+
Using POST, GET, COOKIE, or SERVER Data
=======================================
@@ -136,15 +144,17 @@ Class Reference
$this->input->post(NULL, TRUE); // returns all POST items with XSS filter
$this->input->post(NULL, FALSE); // returns all POST items without XSS filter
-
+
To return an array of multiple POST parameters, pass all the required keys
as an array.
::
+
$this->input->post(array('field1', 'field2'));
-
+
Same rule applied here, to retrive the parameters with XSS filtering enabled, set the
second parameter to boolean TRUE.
::
+
$this->input->post(array('field1', 'field2'), TRUE);
.. method:: get([$index = NULL[, $xss_clean = NULL]])
@@ -167,15 +177,17 @@ Class Reference
$this->input->get(NULL, TRUE); // returns all GET items with XSS filter
$this->input->get(NULL, FALSE); // returns all GET items without XSS filtering
-
+
To return an array of multiple GET parameters, pass all the required keys
as an array.
::
+
$this->input->get(array('field1', 'field2'));
-
+
Same rule applied here, to retrive the parameters with XSS filtering enabled, set the
second parameter to boolean TRUE.
::
+
$this->input->get(array('field1', 'field2'), TRUE);
.. method:: post_get($index[, $xss_clean = NULL])
@@ -218,10 +230,11 @@ Class Reference
$this->input->cookie('some_cookie');
$this->input->cookie('some_cookie, TRUE); // with XSS filter
-
+
To return an array of multiple cookie values, pass all the required keys
as an array.
::
+
$this->input->cookie(array('some_cookie', 'some_cookie2'));
.. method:: server($index[, $xss_clean = NULL])
@@ -239,7 +252,8 @@ Class Reference
To return an array of multiple ``$_SERVER`` values, pass all the required keys
as an array.
::
- $this->input->server(array('SERVER_PROTOCOL', 'REQUEST_URI'));
+
+ $this->input->server(array('SERVER_PROTOCOL', 'REQUEST_URI'));
.. method:: input_stream([$index = NULL[, $xss_clean = NULL]])
@@ -437,4 +451,4 @@ Class Reference
echo $this->input->method(TRUE); // Outputs: POST
echo $this->input->method(FALSE); // Outputs: post
- echo $this->input->method(); // Outputs: post \ No newline at end of file
+ echo $this->input->method(); // Outputs: post