If you're looking for a free handout, good luck; not many here are willing to just write code for you. As for how to approach the problem, we need to know how much you can do and what we need to fill in.
For example, do you know how to properly handle file uploads from a form in PHP? If not, a good place to start would be this manual page: [man]features.file-upload[/man].
Once you get the image file uploaded to PHP properly, it's a simple matter of inserting any relevant data into the database as well as the file's contents using a basic INSERT query. Don't forget to use your DBMS' appropriate escaping function on the file's contents so that the data doesn't destroy the query string.