charles07 Posted November 13, 2012 Share Posted November 13, 2012 hi am trying to delete the browser cookie PHPSESSID on logout using the following code unset(Yii::app()->request->cookies['PHPSESSID']); Yii::app()->request->cookies->clear(); but the cookie stays there even after this, is there any other way to clear these cookies? regards charles Link to comment Share on other sites More sharing options...
Antonio Conte Posted November 13, 2012 Share Posted November 13, 2012 Sure the cookie is just not recreated somewhere in your app after it is deleted? Looking at the manual, you seem to be doing this correctly. Link to comment Share on other sites More sharing options...
charles07 Posted November 14, 2012 Author Share Posted November 14, 2012 no it's not being recreated, let me try it again Link to comment Share on other sites More sharing options...
charles07 Posted November 14, 2012 Author Share Posted November 14, 2012 Yii::app()->session->destroy('sessionName'); this did the trick. Link to comment Share on other sites More sharing options...
Antonio Conte Posted November 14, 2012 Share Posted November 14, 2012 There's a big difference between a cookie and a session. Glad you solved the problem. Link to comment Share on other sites More sharing options...
charles07 Posted November 15, 2012 Author Share Posted November 15, 2012 thanks Antonio i knw diff btwn session & cookie, i was referring to deleting session . i wrote it wrong. regards charles Link to comment Share on other sites More sharing options...
Recommended Posts