Welcome Guest, Not a member yet? Register   Sign In
[HELP] upload
#3

[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>&lt;input type="file" name="upd_gbr_brg"&gt;&lt;/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 ?


Messages In This Thread
[HELP] upload - by El Forum - 07-19-2012, 03:07 AM
[HELP] upload - by El Forum - 07-19-2012, 03:45 AM
[HELP] upload - by El Forum - 07-19-2012, 03:51 AM
[HELP] upload - by El Forum - 07-19-2012, 03:59 AM
[HELP] upload - by El Forum - 07-19-2012, 04:03 AM
[HELP] upload - by El Forum - 07-19-2012, 05:53 AM



Theme © iAndrew 2016 - Forum software by © MyBB