Loading…

How to use session in Yii?

Create Session

Yii::app()->session['name'] = "umesh singh";

Get value from session

$name = Yii::app()->session['name'];

Unset session like

unset(Yii::app()->session['name']);

Remove all session

Yii::app()->session->clear();

Remove session from server

Yii::app()->session->destroy();

Suggest An Answer

No suggestions avaliable!

Latest post from YII Interview Questions

Ask Question