[thelist] php/mysql image related links

Boris Mann boris at bmannconsulting.com
Thu Sep 25 02:29:43 CDT 2003

On Thursday, September 25, 2003, at 12:21 AM, Joshua Hmielowski wrote:

> What I am trying to accomplish is  after i query the database for my 
> image paths,
> the user can click on the thumbnail and the largeimg path will then be 
> created along
> with other information to go along with that particular product. ie. 
> id # , name, series, and sizes.
> I have realized that javascript and php dont like each other and 
> calling a function is no good with the
> onClick event.
>  what can I do to call this function on this event using php?
> also how can know which photo was chosen to echo the correct 
> information and how?

This is kind of like asking how to skin a cat -- there are many, many, 
many different ways to potentially do this, but you haven't given very 
much information on what you want to accomplish.

I assume you have a bunch of info with associated image data stored in 
a DB. Example of outputted HTML (generated via template/PHP somehow):

<a href="details.php?id=345"><img src="/path/to/img/from/db" alt="Alt 
from DB" border="0"></a>

So, clicking on the image would submit the url details.php?id=345 --> 
the details.php page would look up product 345 and generate a details 

Boris Mann

More information about the thelist mailing list