[php] Problem with uploading photos

Hello…
i have the attached script for a database administration…
most of it works fine, the only problem is that it does not upload the photo in the destination folder and in the database’s field it only saves the filename, without the path…
can anyone help me?