There is an on going discussion amongst web developers as to whether to store images in a database or a file system. In my opinion, for the average developers I would think it easier and better to upload an image to a directory and then just store the file name (and maybe other file related info) in the database.
Since you are asking for examples I will assume you are bit of a php novice and provide you some reference material.
First, if you go with uploading to a directory, look at [man]move_uploaded_file[/man]. It has several examples that will be informative no matter what approach you use. And then to store the file name in a database you will will want to find a tutorial on using php and mysql.
Second if you really want to store the file in the database do search on "mysql binary file storage". The MySQL manual has some info on using Blobs. Then you will want to find a tutorial. I did a search on Google for "mysql file upload" and the first result looked good. Just make sure any tutorial you use is recent.
Hope that gets you going.