From 885b0343036695ad673fc24ba7682fc155c54036 Mon Sep 17 00:00:00 2001 From: admin Date: Thu, 21 Sep 2006 05:36:15 +0000 Subject: --- user_guide/helpers/cookie_helper.html | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'user_guide/helpers/cookie_helper.html') diff --git a/user_guide/helpers/cookie_helper.html b/user_guide/helpers/cookie_helper.html index 3e89df74d..9c17cdd5c 100644 --- a/user_guide/helpers/cookie_helper.html +++ b/user_guide/helpers/cookie_helper.html @@ -76,7 +76,7 @@ Cookie Helper

set_cookie()

Sets a cookie containing the values you specify. There are two ways to pass information this function so that a cookie can be set: -Arrray Method, and Discreet Parameters:

+Array Method, and Discreet Parameters:

Array Method

@@ -112,6 +112,30 @@ zero the cookie will only last as long as the browser is open.

set_cookie($name, $value, $expire, $domain, $path, $prefix); +

get_cookie()

+ +

Lets you fetch a cookie. The first parameter will contain the name of the cookie you are looking for:

+ +get_cookie('some_cookie'); + +

The function returns FALSE (boolean) if the item you are attempting to retrieve does not exist.

+ +

The second optional parameter lets you run the data through the XSS filter. It's enabled by setting the second parameter to boolean TRUE;

+ +get_cookie('some_cookie', TRUE); + + + +

delete_cookie()

+ +

Lets you delete a cookie. Unless you've set a custom path or other values, only the name of the cookie is needed:

+ +delete_cookie("name"); + +

This function is otherwise identical to set_cookie(), except that it does not have the value and expiration parameters. You can submit an array +of values in the first parameter or you can set discreet parameters.

+ +delete_cookie($name, $domain, $path, $prefix) -- cgit v1.2.3-24-g4f1b