Welcome Guest, Not a member yet? Register   Sign In
Can't unset session variable
#1

[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!





Messages In This Thread
Can't unset session variable - by El Forum - 02-02-2012, 05:19 AM
Can't unset session variable - by El Forum - 02-02-2012, 05:35 AM
Can't unset session variable - by El Forum - 02-02-2012, 06:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB