From 10c3f41cbe5bd3bb66fd106cc9fb171ffcc7364b Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 8 Oct 2006 07:21:12 +0000 Subject: --- user_guide/libraries/input.html | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'user_guide/libraries/input.html') diff --git a/user_guide/libraries/input.html b/user_guide/libraries/input.html index 883c691a3..4e5ac3b7f 100644 --- a/user_guide/libraries/input.html +++ b/user_guide/libraries/input.html @@ -33,7 +33,7 @@ window.onload = function() {
- +

Code Igniter User Guide Version 1.5.0

Code Igniter User Guide Version 1.5.0b1

@@ -117,9 +117,9 @@ Note: This function should only be used to deal with data upon submission. It's -

Using POST or COOKIE Data

+

Using POST, COOKIE, or SERVER Data

-

Code Igniter comes with two helper functions that let you fetch POST or COOKIE items. The main advantage of using the provided +

Code Igniter comes with three helper functions that let you fetch POST, COOKIE or SERVER items. The main advantage of using the provided functions rather then fetching an item directly ($_POST['something']) is that the functions will check to see if the item is set and return false (boolean) if not. This lets you conveniently use data without having to test whether an item exists first. In other words, normally you might do something like this: @@ -138,7 +138,13 @@ else
$something = $this->input->post('something'); -

The two functions are:

+

The three functions are:

+ +

$this->input->post()

@@ -158,6 +164,12 @@ else
$this->input->cookie('some_data', TRUE); +

$this->input->server()

+ +

This function is identical to the above functions, only it fetches server data:

+ +$this->input->server('some_data'); + -- cgit v1.2.3-24-g4f1b