if($_FILES['image']['error'] == 0){
$target_path_folder = "../images/articles/";
$fileName = time() . rand(11, 99) . basename( $_FILES['image']['name']);
$target_path = $target_path_folder .$fileName;
move_uploaded_file($_FILES['image']['tmp_name'], $target_path);
updateDB($_POST['id'], $_POST['title'], $_POST['date'], $_POST['preview'], $_POST['description'], $fileName);
}
Should help