diff options
Diffstat (limited to 'system/libraries')
-rw-r--r-- | system/libraries/Input.php | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/system/libraries/Input.php b/system/libraries/Input.php index 8c08468bd..0b05c54d6 100644 --- a/system/libraries/Input.php +++ b/system/libraries/Input.php @@ -274,6 +274,28 @@ class CI_Input { // --------------------------------------------------------------------
/**
+ * Fetch an item from either the GET array or the POST
+ *
+ * @access public
+ * @param string The index key
+ * @param bool XSS cleaning
+ * @return string
+ */
+ function get_post($index = '', $xss_clean = FALSE)
+ {
+ if ( ! isset($_POST[$index]) )
+ {
+ return $this->get($index, $xss_clean);
+ }
+ else
+ {
+ return $this->post($index, $xss_clean);
+ }
+ }
+
+ // --------------------------------------------------------------------
+
+ /**
* Fetch an item from the COOKIE array
*
* @access public
|