Ok I just started a topic about some of the stuff you are talking about, here:
http://www.dreamincode.net/forums/showtopic56318.htmNow, you don't save images to the database, that would be stupidly expensive in terms of memory and resources. You don't really need it in the database, you only need information about it and where to find it. So your database would look something like this
CODE
id address date size description
--- --------- ----- ---- -------------
1 mydog.jpg 2008-07-01 125 A picture of my dog on canada day.
.
.
.
Something like that, you can even use the address/name field as your primary key instead of having an id key. The idea of a database is to enable you to index files so you can pull data out fast. An image itself does not hold data you can look for, I'm talking about the pixels or the vectors. Unless you are making a special software that can compare pictures, like a face recognition program then you have no need to use a database.
Now the pictures you would store in a folder (just like all the uploading sites do), change the name to make it unique tho by appending the date to the name or something like that, and register it in your database.
About the categories, you don't have a table for each category, that would be a waste. You create a table that contains category names a category id, then you use the category id as the primary key and a foreign key to your pictures table. Try drawing a ERD and think about the relationships and events that will happend in your system. But, you can upload each picture to a different place on your harddrive and then point to it in your database.
And one last thing to help you out, there is a tutorial here about how to upload a picture in PHP, you should check it out.
edit: sorry the table is all messed up, I tried to fix it, didn't go well...
This post has been edited by Mike007: 3 Jul, 2008 - 03:08 PM