diff options
Diffstat (limited to 'user_guide/libraries')
-rw-r--r-- | user_guide/libraries/input.html | 18 |
1 files changed, 10 insertions, 8 deletions
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:</p> <p>Using this method, an associative array is passed to the first parameter:</p> <code>$cookie = array(<br /> - 'name' => 'The Cookie Name',<br /> - 'value' => 'The Value',<br /> - 'expire' => '86500',<br /> - 'domain' => '.some-domain.com',<br /> - 'path' => '/',<br /> - 'prefix' => 'myprefix_',<br /> - );<br /> + 'name' => 'The Cookie Name',<br /> + 'value' => 'The Value',<br /> + 'expire' => '86500',<br /> + 'domain' => '.some-domain.com',<br /> + 'path' => '/',<br /> + 'prefix' => 'myprefix_',<br /> + 'secure' => TRUE<br /> +);<br /> <br /> $this->input->set_cookie($cookie); </code> @@ -208,12 +209,13 @@ zero the cookie will only last as long as the browser is open.</p> <p>For site-wide cookies regardless of how your site is requested, add your URL to the <strong>domain</strong> starting with a period, like this: .your-domain.com</p> <p>The path is usually not needed since the function sets a root path.</p> <p>The prefix is only needed if you need to avoid name collisions with other identically named cookies for your server.</p> +<p>The secure boolean is only needed if you want to make it a secure cookie by setting it to TRUE.</p> <h4>Discrete Parameters</h4> <p>If you prefer, you can set the cookie by passing data using individual parameters:</p> -<code>$this->input->set_cookie($name, $value, $expire, $domain, $path, $prefix);</code> +<code>$this->input->set_cookie($name, $value, $expire, $domain, $path, $prefix, $secure);</code> <h2>$this->input->get_cookie()</h2> |