I tried to add the audio file into the folder and its name to database but file doesnot upload into the folder but it is added into the database.Following is my Controller:
public function add_audio(){
$config['upload_path'] = './songs/';
$config['allowed_types'] = 'mp3|3gp|mpeg|mp4';
$this->load->library('upload',$config);
$this->upload->do_upload('output');
$data['audio'] = $_FILES['output']['name'];
$this->load->model('main');
$query = $this->main->insert('audio',$data);
if($query = TRUE){
$this->load->view('admin/success');
}else{
redirect($_SERVER['HTTP_REFERER']);
}//end else
}//end function
my folder name is songs.and database name is audio.Database is uploading the audio name but not the folder..so please help