Originally posted by phence
The problem is that the image is not going to be uploaded on the page it asks the user to Browse thier computer for the image.
You can't do that. The "browse" and the upload are part of the same mechanism in the web browser.
You can't have a preview before the upload. You don't have the image until they upload it, and you can't show them a preview of an image you don't have.
What you can do is have the user upload the file, show a preview of everything, then have a "commit changes" button to make things permanent.
How can i collect the image path and it's properties? i'm just lost as to what to do and impliment an image database with this site.
See here for how to handle file uploads:
http://www.php.net/manual/en/features.file-upload.php
How many different directories should i use to store the images? should the images be stored according to category?
Handle the directories however you want. It shouldn't really matter; category and such should be handled in the database. Put the category and other info, and the filename, into the database. Keep in mind though that some servers' filesystems don't handle directories with lots of files very well, in which case you are better off splitting things into multiple directories instead of one big one.
what happens if one user wants to upload my_bike.jpg and there is already a my_bike.jpg file in the image directory?
Don't let the user choose the filename. Give it a number or something. I often name files based on the primary key for the file's info in the database. That way you know it will be unique. Also, by not allowing them to choose the name, you avoid nasty things like users specifying "../../../some/other/directory".