//to set globalunit
public function actionSetUnit(){
Yii::app()->user->setState('globalunit',$_POST['unit']);
}
//to get globalunit
public function actionGetUnit(){
echo Yii::app()->user->getState('globalunit');
}
i often call actionSetUnit in my view, when i change/click my combo unit in my view. but when i call getUnit function in my view to show globalunit value, the result/respons unstable. sometime the respons is true according the last unit i choose in combo Unit. sometime the respons is false (not change according the value of the last unit i choose in combo unit)
Maybe i too much call setState function to set value session with same name.
any missing in my code??

Help












