[eluser]WanWizard[/eluser]
Showing us the error message might help.
My guess: empty() is a language construct, you can't use it on the return value of a method.
Use this instead:
Code:
// post() returns FALSE if the variable doesn't exist
$treat_MRI = $this->input->post('treat_MRI');
$data = array(
'demo_NumID' => $ptID,
'treat_num' => $trtnum+1,
'treat_unit' => $this->input->post('treat_unit'),
'treat_region' => $this->input->post('treat_region'),
'treat_location' => $locate,
'treat_dose' => $this->input->post('treat_dose'),
'treat_fractions' => $this->input->post('treat_fractions'),
'treat_MRI' => $treat_MRI === FALSE ? NULL : $treat_MRI,
'treat_CT' => $this->input->post('treat_CT'),
'treat_RFV' => $this->input->post('treat_RFV'),
'treat_VD' => $this->input->post('treat_VD'),
'treat_PD' => $this->input->post('treat_PD'),
'treat_DELI' => $this->input->post('treat_DELI'),
'treat_AUTH' => $this->input->post('treat_AUTH'),
'treat_START' => $this->input->post('treat_START'),
'treat_notes' => $this->input->post('treat_notes'),
'treat_created_on' => unix_to_human(now(), TRUE, 'us'),
'treat_created_by' => $user['username']);
$this->db->insert('treatments', $data);