Destroy session if exists


I have two pages - start & finish.

A session is set on finish using:

      // Init new session object

      $this->searchSession = new CHttpSession;


      // Set timeout for session data in seconds



      // Starts the session if it has not started yet.


If someone navigates to start I want to check whether a session is set and if so destroy it. How can I check that a session is set?

And if it is set would i use this code to destroy it?:

      $this->searchSession = new CHttpSession;


Hi guys, any help with this one?

My only thought is to check whether a particular var isset and use that as an indicator that a session isset.


why you don’t use ?