From 700205ad5cb6c00596ad82d5ed282f516add5481 Mon Sep 17 00:00:00 2001 From: Derek Jones Date: Fri, 28 Jan 2011 07:44:28 -0600 Subject: updating copyrights to 2011 --- user_guide/libraries/input.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'user_guide/libraries/input.html') diff --git a/user_guide/libraries/input.html b/user_guide/libraries/input.html index d838cf020..552c49afd 100644 --- a/user_guide/libraries/input.html +++ b/user_guide/libraries/input.html @@ -262,7 +262,7 @@ Previous Topic:  Image Manipulation Class User Guide Home   ·   Next Topic:  Loader Class

-

CodeIgniter  ·  Copyright © 2006-2010  ·  EllisLab, Inc.

+

CodeIgniter  ·  Copyright © 2006 - 2011  ·  EllisLab, Inc.

-- cgit v1.2.3-24-g4f1b From ff1cfa1ae5c5440bfde35c36ecb4cdcd73cd3966 Mon Sep 17 00:00:00 2001 From: vascopj Date: Sun, 13 Feb 2011 21:30:19 +0000 Subject: Updated the post method and added the new functionality to the get method also Updated the documentation --- user_guide/libraries/input.html | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'user_guide/libraries/input.html') diff --git a/user_guide/libraries/input.html b/user_guide/libraries/input.html index 552c49afd..4faecd768 100644 --- a/user_guide/libraries/input.html +++ b/user_guide/libraries/input.html @@ -132,12 +132,32 @@ else
$this->input->post('some_data', TRUE); +

To return an array of all POST items call without any parameters.

+

To return all POST items and pass them through the XSS filter leave the first parameter blank while setting the second parameter to boolean;

+

The function returns FALSE (boolean) if there are no items in the POST.

+ + + $this->input->post(); // returns all POST items with XSS filter +
+ $this->input->post('', FALSE); // returns all POST items without XSS +
+

$this->input->get()

This function is identical to the post function, only it fetches get data:

$this->input->get('some_data', TRUE); +

To return an array of all GET items call without any parameters.

+

To return all GET items and pass them through the XSS filter leave the first parameter blank while setting the second parameter to boolean;

+

The function returns FALSE (boolean) if there are no items in the GET.

+ + + $this->input->get(); // returns all GET items with XSS filter +
+ $this->input->get('', FALSE); // returns all GET items without XSS filtering +
+

$this->input->get_post()

This function will search through both the post and get streams for data, looking first in post, and then in get:

-- cgit v1.2.3-24-g4f1b From d8d1e24eee56d2466c91ecd72b3c8932eb3d0639 Mon Sep 17 00:00:00 2001 From: Phil Sturgeon Date: Wed, 16 Feb 2011 17:23:16 +0000 Subject: Secure cookies can now be made with the set_cookie() helper and Input Class method. --- user_guide/libraries/input.html | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'user_guide/libraries/input.html') diff --git a/user_guide/libraries/input.html b/user_guide/libraries/input.html index 4faecd768..844e99ab8 100644 --- a/user_guide/libraries/input.html +++ b/user_guide/libraries/input.html @@ -187,13 +187,14 @@ Array Method, and Discrete Parameters:

Using this method, an associative array is passed to the first parameter:

$cookie = array(
-                   'name'   => 'The Cookie Name',
-                   'value'  => 'The Value',
-                   'expire' => '86500',
-                   'domain' => '.some-domain.com',
-                   'path'   => '/',
-                   'prefix' => 'myprefix_',
-               );
+    'name'   => 'The Cookie Name',
+    'value'  => 'The Value',
+    'expire' => '86500',
+    'domain' => '.some-domain.com',
+    'path'   => '/',
+    'prefix' => 'myprefix_',
+    'secure' => TRUE
+);

$this->input->set_cookie($cookie);
@@ -208,12 +209,13 @@ zero the cookie will only last as long as the browser is open.

For site-wide cookies regardless of how your site is requested, add your URL to the domain starting with a period, like this: .your-domain.com

The path is usually not needed since the function sets a root path.

The prefix is only needed if you need to avoid name collisions with other identically named cookies for your server.

+

The secure boolean is only needed if you want to make it a secure cookie by setting it to TRUE.

Discrete Parameters

If you prefer, you can set the cookie by passing data using individual parameters:

-$this->input->set_cookie($name, $value, $expire, $domain, $path, $prefix); +$this->input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure);

$this->input->get_cookie()

-- cgit v1.2.3-24-g4f1b