I'd say you'd need to add a "color" field to the MySQL table otherwise you'd have to do some pretty hardcore hacking on the images to get there overall color. Then just use a WHERE cause in the SQL "WHERE `color`='red'".
How to display image from mysql
Collapse
X
-
-
It's fairly simple. You query the database for the colors, loop through them, and print each color as an <option> for your <select> box. - If you read through any one of the literally hundreds of beginner PHP/MySQL tutorials out there, this should be no problem.
Try it. If you run into problems, post them here. (With proper explanations!)Comment
Comment