Aqui lo tengo
![Policia](http://static.forosdelweb.com/fdwtheme/images/smilies/cop.png)
, Gracias a Spider_Boy (foro.powers.cl)
Código:
<html>
<head>
<script language="Javascript">
function showimage()
{
document.images.per.src = 'http://www.sitio/banner/' + document.form.per.options[document.form.per.selectedIndex].value;
}
function nombre()
{
document.form.per.value = "http://sitio/banner/" + document.form.per.value;
}
</script>
</head>
<body>
<table border=0 cellpadding=0 cellspacing=0>
<td align="center" valign="middle">
Registro
</tr></td>
<tr><td>
<?php
$files = glob("*.jpg");
echo "<form name= 'form' method= 'post'>";
echo "<select id= 'per' name= 'per' onchange= 'showimage(); nombre()'>";
echo "<br><br>";
for($index = 0; $index < count($files); $index++)
{
$cad1 = $files[$index];
$cad = explode(".",$cad1);
?>
<option value="<?php echo $files[$index]?>"><?php echo $cad[0];?></option>
<?php
}
echo "</select>","<br><br>";
echo "<img src= 'banner.jpg' width=468 height=60 id= 'per' name= 'per'>";
echo "<input type='submit' name='Submit' value='Ver'>";
echo "</form>","<br>";
?>
</tr></td>
</table>
</body>
</html>