March 11, 201016 yr Can anyone help, I would like the drop down list to display an image next to it when you select one of the selections, I also need it to display a short caption under the list so that it gives a brief description, can anyone help me with this as i've searched the web and it's not coming back with anything, here's the code i have so far to show you what i already have <?php require ("connect.php") ; //extract data $extract = mysql_query("SELECT * FROM image_styles ORDER BY id ASC") or die(mysql_error()); $numrows = mysql_num_rows($extract); echo "<select name='styles'>"; while ($row = mysql_fetch_assoc($extract)) { $id = $row['id']; $styles = $row['styles']; echo " <option name='$id'>$styles </option> "; } echo "</select>"; ?>
March 12, 201016 yr Hi, Unfortunately some browsers like IE do not show images in drop-down lists. I think you can see them in Firefox, but if you want to display important information, I would advise not to rely on the image in the drop-down list.
March 12, 201016 yr I think you are going to require some javascript client side to show the image of the styles that are selected.
March 12, 201016 yr Author I think you are going to require some javascript client side to show the image of the styles that are selected. ok, perhaps i should go back to the way i had it before and call upon the php as an action, this way i had it working correctly. Can anyone point in the right direction for this now? Let's say i select one option from a drop down list, i then submit it, that stores in my database and i then go onto the next page, i then have another drop down box. How do i get it to only display the options depending on what was selected in the 1st drop down box? Thanks in advanced.
Create an account or sign in to comment