Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function prosesinput()
- {
- if ($this->session->getValue('username')==TRUE){
- if ($_POST){
- //upload
- $this->upload->setOption(
- array(
- 'folderLocation'=>'uploads/'.date('Y').'/'.date('m').'/',
- 'autoCreateFolder' => true,
- 'permittedFileType' => 'gif|png|jpg',
- 'maximumSize' => 1000000,
- )
- );
- if (isset($_FILES['foto'])){
- $file=$this->upload->now($_FILES['foto']);
- if ($file){
- $datafoto=$this->upload->getFileInfo();
- $foto=$datafoto['name'];
- }else if(empty($file)){
- $foto='';
- }else{
- $error=$this->upload->getError('message');
- $error=$error[3];
- }
- }
- //end upload
- $nama=$this->request->post('nama');
- $sekolah=$this->request->post('sekolah');
- $kelamin=$this->request->post('kelamin');
- $kelas=$this->request->post('kelas');
- $tempatlahir=$this->request->post('tempatlahir');
- $tanggallahir=$this->request->post('tanggallahir');
- $telpon=$this->request->post('telpon');
- $alamat=$this->request->post('alamat');
- $status=$this->request->post('status');
- $database=array(
- 'nama'=>$nama,
- 'sekolah'=>$sekolah,
- 'kelamin'=>$kelamin,
- 'kelas'=>$kelas,
- 'tempatlahir'=>$tempatlahir,
- 'tanggallahir'=>$tanggallahir,
- 'telpon'=>$telpon,
- 'alamat'=>$alamat,
- 'status'=>$status,
- 'foto'=>$foto,
- );
- print_r($database); exit;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement