[eluser]Unknown[/eluser]
I have a function that deletes a file and then attempts to unset it from a session variable like so
Code:
function removePrescription($id, $item)
{
$fileToRemove = $this->session->userdata['prescription_details'][$id][$item]['prescriptionName'];
unlink("./active/" . $fileToRemove);
$this->session->set_userdata['prescription_details'][$id][$item]['prescriptionName'] = '';
redirect($this->aData['base_url'] . 'checkout/basket');
}
The function removes the file okay but when it tries to unset the session variable I get this error.
Undefined property: CI_Session::$unset_userdata
Does anyone know what I'm doing wrong?
Thanks for any help!