Implementation of Session

Can any one suggest me how to use session efficiently ?

What do you mean by "efficiently" ?

Where to use ? How to use ?

I don’t know what you want exactly…

You can take advantage through session Application Component: http://www.yiiframework.com/doc/guide/1.1/en/basics.application#application-component

For more information take a look at class reference: http://www.yiiframework.com/doc/api/1.1/CHttpSession




  $session=new CHttpSession;

  $session->open();

  $value1=$session['name1'];  // get session variable 'name1'

  $value2=$session['name2'];  // get session variable 'name2'

  foreach($session as $name=>$value) // traverse all session variables

  $session['name3']=$value3;  // set session variable 'name3'




My form has 3 consecutive steps. Only at the final step i.e.3 step data is to be inserted in to 3 different tables.

So before inserting them I need to store each input form value in session.

If you have any good idea better than this please let me know.

If they’re 3 separate pages then I guess session would do it. Personally I would try to put them all in 1 page and have jquery hide/show each steps, keeping them all in 1 form.

That is also nice idea. I appreciate you.

Is there any jquery implemented in Yii framework?

Depending on what you are looking for would this help you?

http://www.yiiframework.com/extension/wizard-behavior/