How to Destroy all sessions and cookies in codeIgnitor?

I am wondering if is there any way to remove all domain site cookies and sessions params.
Ankur Rajput
Asked 03-04-2020
48

Answer (1)
Distroy cookies in php if (isset($_COOKIE['remember_user'])) { unset($_COOKIE['Hello']); unset($_COOKIE['HelloTest1']); setcookie('Hello', null, -1, '/'); setcookie('HelloTest1', null, -1, '/'); return true; } else { return false; }
Harsh Aggrawal
Asked 22-05-2019
45 Likes
Comments
Write comment

Answer (2)
$this->session->sess_destroy(); use this code in your method.
Ankur Rajput
Asked 28-06-2018
45 Likes
Comments
how to get #variable or any variable from url in javascript
By : Deepak Sharma | 05-11-2019 | 45 Likes
if url is www.example.com#home1 var hash = window.location.hash.substr(1); alert(hash);
By : Ankur Rajput | 05-11-2019 | 45 Likes
Need to  import KeyValue in .ts file.
import { KeyValue } from '@angular/common';
By : Faisal Khan | 09-01-2020 | 45 Likes
Write comment

Submit your answer