I created a session array using
$_SESSION['create'] = array();
then filled out the array using this,
$_SESSION['create']['new-campaign-name'] = $_POST['new-campaign-name'];
$_SESSION['create']['new-campaign-type'] = $_POST['new-campaign-type'];
$_SESSION['create']['new-campaign-country'] = $_POST['new-campaign-country'];
$_SESSION['create']['new-campaign-list'] = $_POST['new-campaign-contact'];
$_SESSION['create']['new-campaign-des'] = $_POST['new-campaign-des'];
but i would want to delete all of the content of the session array.
i tried this
unset($_SESSION['create']);
but it seems to be not working and all of the values are still on the session data, is there a way to reset the contents of my session array?
$_SESSION['create'] = array();again?unset($_SESSION['create'])works to unset that particular key, if it doesn't work for you, maybe some code is adding it in again.$_SESSION=array()would reset the whole session.