| Session variable |
|
If we use same value of the variable for number of pages to our project, then we can use session variable type for that value. |
| Example Code: |
|
$_SESSION['userid']=trim($_POST['userid']); • session_start (); -If we use session variable in php files. Then we should start the session in which files are using session variable. Some times, one error will be occurred on time of session_start (); variable uses, that is session already started and sent output to header. This time we should add the code “ob_start();” at same session_start(); function line or next line for avoid this error. |