I Hope my question is not wrong(not easy for you). to the point...
I have form with validation (check to database MySQL). like this
controller
$ck['no_ktp'] = $this->input->post('no_ktp');
$cek = $this->app_model->getSelectedData("biodata_karyawan",$ck);
if($cek->num_rows()>0)
{
$this->session->set_flashdata('flash_messages', 'ERROR : No KTP sudah ada di data karyawan..!!!');
redirect( base_url() . 'karyawan/tambah/' . $site );
}
else
{
this code is work with appear messages 'ERROR : No KTP sudah ada di data karyawan..!!!' but the form input will be reset. so I must input this form again.
Question
How to still appear the messages but the field not reset ?
thanks before for your time