• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Image Upload

#1
[eluser]Unknown[/eluser]
Hi,
I want to upload i single image. but don't know how to?

my view code is :
********************************
echo form_open_multipart('mc/images', $attributes);
echo form_hidden('txthidden', 'addimage');
echo form_upload("txttmage", "", "class='textboxcss'");
echo form_submit('txtsubmit', 'Submit');
echo form_close();
********************************

my controller code is:
***********************************
$config['upload_path'] = './uploads/';
$config['allowed_types'] = 'gif|jpg|png';
if (!$this->upload->do_upload())
{
$error = array('error' => $this->upload->display_errors());
}else{
$data = array('upload_data' => $this->upload->data());
}
***********************************

can anyone guide me how to make it complete. ???


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.