Bu Kodun Neresi Hatalı bilmiyorum ama herşeyi yaptım yinede resimi veritabanına kayıt etmiyor
<?php                                              
                                                        if ($_FILES)
                                                        {
                                                            $image = $_FILES ['image'];
                                                            if($image['name']!="")
                                                            {
                                                                $foo = new Upload($image);
                                                                if ($foo->uploaded)
                                                                {
                                                                    $foo->file_new_name_body = 'avatar';
                                                                    $foo->allowed = array('image/*');
                                                                    $foo->file_max_size = '4048000';
                                                                    $foo->process('upload/'.$kbilgi['id']);
                                                                    if ($foo->processed)
                                                                    {
                                                                        
                                                                        $sorgu = $vt->prepare("update uyeler set resim = ? where id = ?" );
                                                                        $calistir = $sorgu->execute(array($username,$kbilgi['id']));
                                                                        if ($calistir)
                                                                        {
                                                                            echo 'Profil Resmi Güncellendi';
                                                                        }
                                                                        else
                                                                        {
                                                                            echo 'Profil Resmi Güncellenemedi';
                                                                        }


                                                                        
                                                                    }
                                                                    else
                                                                    {
                                                                        echo 'Dosya Eklenemedi';
                                                                    }
                                                                }
                                                            }
                                                            else
                                                            {
                                                                echo 'Lütfen Resim Seçiniz';
                                                            }
                                                        }
                                                        ?>