[eluser]brixxster[/eluser]
Hello peng kong..
I put it there because it seems like it's not loading the database library in the autoload.php. So just to make sure (may sound funny
) added it there.
I checked the database.php all is setup properly. I actually have other functions that communicates to the database and works fine but this one won't.
here is the code again without the database library loaded inside the function
Code:
function updateapp (){
$data['internal_content'] = 'view_update_applicant';
$data['headTitle']='Applicant Details Updated';
// test the value of the submit button
$action = $this->input->post('submit');
if ($action == "Approve")
{
echo "aprroved";
}
else
{
$updatedata = array(
'fname' => $this->input->post('fname'),
'lname' => $this->input->post('lname'),
'mname' => $this->input->post('mname'),
'email' => $this->input->post('email'),
'address' => $this->input->post('address'),
'city' => $this->input->post('city'),
'province' => $this->input->post('province'),
'country' => $this->input->post('country'),
'zip_code' => $this->input->post('zip_code'),
'cellphone' => $this->input->post('cellphone'),
'telephone' => $this->input->post('telephone'),
'acct_id' => $this->input->post('acct_id')
);
$acct_id = $this->input->post('acct_id');
$updateRec = $this->Model_dbmanagement->update_record($updatedata, $acct_id);
$this->session->set_flashdata('action_message', 'Applicant information has been updated.');
$this->appdetails($acct_id);
}
}
Is there something wrong with what I've written in the above code? I am basically new to CodeIgniter and Php and only taking and tweaking code snippets from samples I find on the internet.
Thanks again.