[eluser]C_Line[/eluser]
i already read it, but i don't understand, every time i submit it always display nothing
heres my code
Code:
view
<form method="post" action="<?php echo base_url(). "index.php/main/updateBarang_admin/". $kode; ?>">
<tr><td align="center" >Gambar Barang : </td><td><input type="file" name="upd_gbr_brg"></td></tr>
controller
function updateBarang_admin($kode)
{
$this->load->model('Query_barang','',TRUE);
$data['query'] = $this->Query_barang->updateBarang($kode);
}
model
function updateBarang($kode)
{
$gambar = $this->input->post('upd_gbr_brg');
$nama = $this->input->post('upd_nm_brg');
$harga = $this->input->post('upd_hg_brg');
$stok = $this->input->post('upd_sk_brg');
$berat = $this->input->post('upd_brt_brg');
$tipe = $this->input->post('upd_tipe_brg');
$gambar = $this->input->post('upd_gbr_brg');
$status = $this->input->post('status_brg');
$config['upload_path'] = './gambar/';
$config['allowed_types'] = 'gif|jpg|jpeg|png';
$config['max_size'] = '2000';
$config['max_width'] = '1920';
$config['max_height'] = '1280';
// You can give video formats if you want to upload any video file.
$this->load->library('upload', $config);
if ( ! $this->upload->do_upload())
{
$error = array('error' => $this->upload->display_errors());
// uploading failed. $error will holds the errors.
}
else
{
$data = array('upload_data' => $this->upload->data());
}
}
why it display nothing ?