Jump to content

Display images in a drop down list


xx_princess_xx

Recommended Posts

I have the image url stored in my sql database, so far i got this but i think im missing a quote, or apostrope

i want the images to be displayed in a drop down menu

 

  echo '<option value="<img height='80' width='120' src='".$row['photo']."'">'<img height='80' width='120' src='".$row['photo']."''</option>';

 

Link to comment
https://forums.phpfreaks.com/topic/158087-display-images-in-a-drop-down-list/
Share on other sites

I wanted to do this, after a lot of googling I found some examples how it is made.

 

The thing is like OP said this is not doable in a normal drop down. You will have to use CSS and javascript.  So You will put all the options and the images into divs and then make them look like drop down list with css. Then add javascript functions for the onClick method, mouseover etc.

 

GL making that :)

 

P.S. I did't make it :( My contractor gave me too little time to play around ;)

The thing is like OP said this is not doable in a normal drop down. You will have to use CSS and javascript.  So You will put all the options and the images into divs and then make them look like drop down list with css. Then add javascript functions for the onClick method, mouseover etc.

 

Overkill.

 

All you need

 

radio - image

radio - image

radio - image

update button

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.