14-session_variables/common_functions.php File Reference

Go to the source code of this file.

Functions

 get_session ($var1)
 This function returns value of SESSION variable whose name is given as argument.
 redirect ($page)
 It is used to redirect user to another page using HTTP META-REFRESH.


Function Documentation

get_session ( var1  ) 

This function returns value of SESSION variable whose name is given as argument.

If variable is not set it returns empty string "" as variable value.

Parameters:
var1 Name of variable whose value should be searched in SESSION array
Returns:
Value of variable in SESSION array. It returns empty string if variable is not present in SESSION array.

Definition at line 20 of file common_functions.php.

References $_SESSION.

Referenced by main().

redirect ( page  ) 

It is used to redirect user to another page using HTTP META-REFRESH.

It also prints session_id() in front of new page automatically. It should be noted that printing of sesssion ID is not required in any new code.

Returns:
Nothing

Definition at line 35 of file common_functions.php.

Referenced by main(), and redirect().


Generated on Fri Nov 4 14:16:55 2011 for PHP example documentation by  doxygen 1.4.7