Hi all. What I want to do is be able to dynamically insert a picture based on a search result. For example, if someone were to search for a movie based on it's title, I would like a picture of the movie to display along with the other info that is in my mysql database. Is there a way in php to do this? Can you store pics in mysql? Can php refer to a pic on my server based on a result from the search, such as title or movie number? Can javascript somehow be implemented to help with this situation? Please help!

~George

You can store images in a mysql db using blob type, but you shouldn't do that. Instead, store the path of the image.

Determine which picture to load based on the search. (many ways to go about that) Say your search engine brings up any results that are similar to the search parameter within a certain degree. Then those results can tell you which image to load. Do a SELECT to find the image path by searching for a matching image name in the databse to your results.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.