Jump to content

Changing a Text Link to Drop Down Box


Clash Man

Recommended Posts

	// display numbers	

if ($numbers != 0){

	if (sizeof($pics) > 1){

		//	display textlinks

		echo "<p id=\"cg_nav2\">";

		// loop over images

		for ($f=1;$f<=sizeof($pics);$f++){

			// if the link to the pic is the selected one, display a bold number and no link

			if ($pic==$f){echo "<b>".$f."</b>";}

			// otherwise display the link

			else{echo ""<a href=\"?p=".$f."\">".$f."</a>";}

		}

		echo "</p>\n";

	}

}	

 

Okay what this does is it loops around creating a link to a certain page with a picture in a directory. It does this for all the images in that particular directory.

 

What I want, is instead of a link, I would like a drop down box that redirects to the page when selected. I do not know php or html very well, so any help would be appreciated.

 

I also only included the part of the code that creates the links.

Link to comment
https://forums.phpfreaks.com/topic/202624-changing-a-text-link-to-drop-down-box/
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.