[eluser]Asinox[/eluser]
ok guys, jejeje, im developing 3 website, yes im overload , im tired, im lost, im not here!!, but im trying now to fix a bug,s in a editing function, the problem is that i have a lot of function like this... but i saw all my functions, and my problem is that i want to upload a file or not, if the user try to upload is fine, or if the user dont want to upload a file is fine too... now im testing and dont work in any case:
Code:
function editar__articulo(){ //function para actualizar articulo
if($this->form_validation->run('articulo') == FALSE){ // VALIDACION DE CAMPOS VACIOS
$data['titulo'] = "Bienvenido al panel de administracion";
$data['main_admin'] = "dashboard/editar_articulo";
$data['categorias'] = $this->modcategorias->listar_categorias();
$data['articulo'] = $this->modarticulos->_editar($this->input->post('id'));
$this->load->vars($data);
$this->load->view('dashboard/main_admin');
}else{
if(!empty($_FILES['userfile']['tmp_name'])){
echo "[removed]alert('with file');[removed]";
}else{
echo "[removed]alert('without file');[removed]";
}
} // VALIDACION DE CAMPOS VACIOS
}
this if is wrong of my way to validate the if file is sending is wrong?
Thanks u