Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial

Priscilla Kam
1,086 Pointsphp problem for a little cart
hi everybody
***** i have a homework that need to submit the little cart. i feel frustrated in the problem of
images upload. for example , i am making a pet shop, and i have mysql tables like ....e.g.
category , products , photos, since now i just try to have little categories for experiment, like cat
or birdie, and users upload the photos to the site, and i have a backend admin to monitor the
products, i want to get photos related to "specific product" or related to "specific product of
certain category" from those table photos , can someone let me know how i can write the sql
statement for this case. (for example i want to get the dog category photos only to the category
page)
**** Also for multiple file upload , it seems that there is a thing like below
<input type="file" name="uploads[ ]" />
uploads[ ] is array right? and how can i make use of this and so that when upload to mysql
photos table, those records are related to those products.
Thank you
2 Answers

Randy Hoyt
Treehouse Guest TeacherIt sounds like what you are trying to do is pretty complicated. Do you have to do it with an image upload through the browser? Or could you edit the database directly to add web addresses for the images? That would be a lot easier than building a content management system to handle all this data.

Priscilla Kam
1,086 Pointsyes, randy , u could say that i am building a "cms" but indeed it is just a little 4 items webpage that manage the products , categories, orders, and logout