[php] file upload and add record to db

hello
i’m building a backend for my site, so far all the text fields are done now i want to do the images…
how can i upload one file and add it to a database in mysql at the same time?
so far the only thing i can do is, upload the image with ftp and then if i use the addrecord page and write the filename it display the image. but i want to have a filefield form and then choose the file and it goes to the database and to the server and display where it should…
i’m using dreamweaver only so if you could explain how to do that with dreamweaver (i’m using that server behaviours and etc…) would be great (i noticed that theres a extension called pure php upload but it’s not free).
If i really need to handcode that’s ok… but let me know how to do that.
thanks in advance.