Welcome Guest, Not a member yet? Register   Sign In
Flashdata not clearing on refresh/redirect
#5

(This post was last modified: 02-12-2021, 10:29 AM by msheath.)

Well my existing controller method follows the same pattern:

Code:
    public function log_illustration_update($id)
    {
        $data = $this->input->post();

        (($data['painting'] != 'X') && ($data['painting'] != null)) ? $entry = false : $entry = true;

        if ($entry == false) {
            $this->session->set_tempdata('message', '<div class="alert alert-danger">The fields Model, Actual, Photo, Drawing and Painting can only be either blank or contain X</div>',10);
            redirect('dashboard/log_illustration_detail/'.$id);
        } else {
            $log_illustration = $this->log_illustrations_model->_update($id, $data);
            if ($log_illustration) {
                $this->session->set_flashdata('message', '<div class="alert alert-success">The log_illustration details were successfully updated!!</div>');
            } else {
                $this->session->set_flashdata('message', '<div class="alert alert-danger">There was an error and the log_illustration details were not updated</div>');
            }
            redirect('dashboard/log_illustration_detail/'.$id);
        }
    }
so I'm still baffled. And by the way I'm not new, I've been using CI for years - never had this issue before.
Reply


Messages In This Thread
RE: Flashdata not clearing on refresh/redirect - by msheath - 02-12-2021, 10:27 AM



Theme © iAndrew 2016 - Forum software by © MyBB