Jump to content

Drop down of thumbnails


smordue

Recommended Posts

I have a dropdown list for switching themes, right now it is just the names, but I would like the list to be thumbnail images of the themes with the name, here is the code for my dropdown:

 

<select onchange="window.location.href=this.options[this.selectedIndex].value">
<option selected="selected" >Select Theme</option>
<option id="Autumn" value="style-switcher.php?style=Autumn">Autumn</option>
<option id="Winter" value="style-switcher.php?style=Winter">Winter</option>
</select>

 

Here is my style-switcher.php:

 

<?php
$style = $_GET['style'];
setcookie("style", $style, time()+604800);
if(isset($_GET['js'])) {
	echo $style; 
} else {
	header("Location: ".$_SERVER['HTTP_REFERER']);
}
?>

 

Attached is what I would like to do:

 

 

 

[attachment deleted by admin]

Link to comment
https://forums.phpfreaks.com/topic/185906-drop-down-of-thumbnails/
Share on other sites

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.