summaryrefslogtreecommitdiffstats
path: root/system/core
diff options
context:
space:
mode:
Diffstat (limited to 'system/core')
-rw-r--r--system/core/Input.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/system/core/Input.php b/system/core/Input.php
index 3e82874fd..fa8080deb 100644
--- a/system/core/Input.php
+++ b/system/core/Input.php
@@ -126,6 +126,22 @@ class CI_Input {
*/
function post($index = '', $xss_clean = FALSE)
{
+ // check if a field has been entered
+ if( empty($index ) )
+ {
+ // no field entered - return all fields
+
+ $all_post_fields = array();
+
+ // loop through the full _POST array
+ foreach( $_POST as $key )
+ {
+ $all_post_fields[$key] = $this->_fetch_from_array($_POST, $key, $xss_clean);
+ }
+ return $all_post_fields;
+
+ }
+
return $this->_fetch_from_array($_POST, $index, $xss_clean);
}