/    Sign up×
Community /Pin to ProfileBookmark

I think I need to use a jump menu to get this to work. Basically I want someone to choose from the jump menu an album. (American Legion, Christmas Party, Ride to Recover) those are the folders. Say someone selects American Legion then below the jump menu it will auto load all of the images from that folder. Any ideas would be much appreciated. If that doesn’t make since let me know ill try to better explain it.

This is what I have:

[code=html]<?php
include “Connections”;
$sql=”SELECT id, albumname FROM AlbumNames”;
$result=mysql_query($sql);

$options=””;

while ($row=mysql_fetch_array($result)) {

$id=$row[“id”];
$albumname=$row[“albumname”];
$options.=”<OPTION VALUE=”$albumname”>”.$albumname;
}
?>
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” “http://www.w3.org/TR/html4/loose.dtd”>
<html>
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=iso-8859-1″>
<title>Untitled Document</title>
<script type=”text/javascript”>
function MM_jumpMenu(targ,selObj,restore){ //v3.0
eval(targ+”.location='”+selObj.options[selObj.selectedIndex].value+”‘”);
if (restore) selObj.selectedIndex=0;
}
</script>
</head>

<body>
<SELECT NAME=options onChange=”MM_jumpMenu(‘parent’,this,0)”>
<option value=”directory.php” selected>Choose
<?=$options?>
</option>
</SELECT>
</body>
</html>[/code]

to post a comment
PHP

0Be the first to comment 😎

×

Success!

Help @shutterbug spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...