To initiate new session,

  • $session = new Session();
  • $session->start();

setting data into session

  • $this->session->set("key", "value");

retrieve session data

  • $this->session->get(“key”);

removing session

  • $this->session->remove(“key”'); //remove particular variable
  • $this->session->destroy(); //remove the session

Suggest An Answer

No suggestions avaliable!