Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function pemohon_post()
- {
- //Pemohon
- $pemohon = new tmpemohon();
- $pemohon->no_referensi = $this->post('no_refer');
- $pemohon->source = $this->post('cmbsource');
- $pemohon->n_pemohon = $this->post('nama_pemohon');
- $pemohon->telp_pemohon = $this->post('no_telp');
- $pemohon->a_pemohon = $this->post('alamat_pemohon');
- $pemohon->email_pemohon = $this->post('email');
- $pemohon->a_pemohon_luar = " ";
- $kelurahan_p = new trkelurahan();
- $kelurahan_p->get_by_id($this->post('kelurahan_pemohon'));
- //$pemohon->save(array($permohonan_akhir, $kelurahan_p));
- $save = $pemohon->save($kelurahan_p);
- //$save2 = $save->db->insert_id();
- if ($save) {
- $message = array(
- 'status' => 'sukses',
- 'success' => true,//Ditambahkan untuk return ke mobile
- 'sukses' => $save->insert_id()
- );
- $this->response($message, 200); // 200 being the HTTP response code
- } else {
- $message = array(
- 'status' => 'gagal',
- 'success' => false,//Ditambahkan untuk return ke mobile
- 'sukses' => 'Gagal'
- );
- }
- $this->response($message, 200); // 200 being the HTTP response code
- }
Add Comment
Please, Sign In to add comment