summaryrefslogtreecommitdiffstats
path: root/user_guide_src/source/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'user_guide_src/source/libraries')
-rw-r--r--user_guide_src/source/libraries/input.rst31
1 files changed, 28 insertions, 3 deletions
diff --git a/user_guide_src/source/libraries/input.rst b/user_guide_src/source/libraries/input.rst
index bcf117358..96d1f07e1 100644
--- a/user_guide_src/source/libraries/input.rst
+++ b/user_guide_src/source/libraries/input.rst
@@ -99,7 +99,7 @@ The function returns FALSE (boolean) if there are no items in the POST.
::
- $this->input->post(NULL, TRUE); // returns all POST items with XSS filter
+ $this->input->post(NULL, TRUE); // returns all POST items with XSS filter
$this->input->post(); // returns all POST items without XSS filter
$this->input->get()
@@ -119,9 +119,9 @@ The function returns FALSE (boolean) if there are no items in the GET.
::
- $this->input->get(NULL, TRUE); // returns all GET items with XSS filter
+ $this->input->get(NULL, TRUE); // returns all GET items with XSS filter
$this->input->get(); // returns all GET items without XSS filtering
-
+
$this->input->get_post()
=========================
@@ -298,3 +298,28 @@ see if PHP is being run on the command line.
$this->input->is_cli_request()
+$this->input->method();
+=====================================
+
+Returns the $_SERVER['REQUEST_METHOD'] in lowercase.
+
+::
+
+ $this->input->method();
+
+$this->input->is_method($method);
+=====================================
+
+Returns TRUE if given method equals $_SERVER['REQUEST_METHOD'], otherwise returns FALSE.
+
+::
+
+ if ( ! $this->input->is_method('post'))
+ {
+ echo 'This is NOT a POST request';
+ }
+ else
+ {
+ echo 'This is a POST request';
+ }
+