Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //call the Increamentcounters() fn
- Increamentcounters($IncreamentNavCounter = TRUE);
- function Increamentcounters($ses_variable='',$IncreamentNavCounter = FALSE){
- global $ses_id,$seslog;
- $ses_variable = 'ses_counter';
- list($ses_counter, $error) = $seslog->SesVarRead($ses_id, $ses_variable);
- if ($error == '') {
- $ses_value = $ses_counter;
- $ses_value++;
- $seslog->SesVarUpdate($ses_id, $ses_variable, $ses_value);
- if ($IncreamentNavCounter) {
- //increament the nav_counter too
- $ses_variable = 'nav_counter';
- Increamentcounters($ses_variable);
- }
- return TRUE;
- }else {
- //we have an error
- return FALSE;
- }
- }//close Increamentcounters() fn
- //debugger variable values
- $ses_variable=(boolean) true
- $IncreamentNavCounter = (boolean) false
- //my qn
- am abit surprised by the results, i thought that the $IncreamentNavCounter would be set to true on calling the function while the $ses_variable value remains null
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement