I am new to mvc , I have down loaded frame work from http://www.php-mini.com
//CONTROLLER
public function upload_slider(){
if(isset($_POST['upload'])) {
$slider_model = $this -> loadmodel('slidermodel');
$slider = $slider_model -> upload_slider(
$_FILES['IMAGE_PATH'],
$_POST['title'],
$_POST['alt']
);
}
//MODEL
//slidermodel
public function upload_slider($IMAGE_PATH = '' ,$title ='',$alt='' ){
$uploaddir = "slider/";
$new_file_name = explode(".", $IMAGE_PATH['name']);
$new_file_name = $new_file_name[count($new_file_name) - 1];
$new_file_name = uniqid(). "." .$new_file_name;
$uploadfile = $uploaddir . basename($new_file_name);
move_uploaded_file($IMAGE_PATH['tmp_name'],$uploadfile);
}
I am failing to upload image
can somone help me ?