PHP MySQL file upload question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jmcc
Forum Newbie
Posts: 5
Joined: Wed May 20, 2009 5:47 am

PHP MySQL file upload question

Post by jmcc »

I have a standard form that retrieves user data and stores it in a MySQL table.

If I want to store multiple photos for each user what is the best way to go about this?
Eric!
DevNet Resident
Posts: 1146
Joined: Sun Jun 14, 2009 3:13 pm

Re: PHP MySQL file upload question

Post by Eric! »

I would build a table which contains the user and then information on the photos:
user,description,filetype,path/to/file/filename

Then you can just sort based on users, descriptions or filetype (jpg,png,etc). You could add other crap like a field for user ranking, number of clicks...blah blah.
Post Reply