this is my code
<html>
<head>
<title>Untitled Document</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<table>
<form method="post" action="<?=$_SERVER["PHP_SELF"]?>">
<tr><td> <select name="filename">
<?
$directory = $DOCUMENT_ROOT . "/phplearn/";
$link = "$directory.$filename";
$dirhandle = opendir($directory);
$diropen = fopen($directory);
if($_POST["submit"]) {
include_once("$link") OR DIE("cannot be done");
}
while($filename = readdir($dirhandle))
{
print("<option value=\"$filename\">$filename</option>");
}
header(Location: "$link");
?>
</select><br></td></tr>
<tr><td> <input type="submit" value="GO"></td></tr>
</form>
</table>
</body>
</html>
i have tried to do alot with this... selected field is <a href> and the header being apart of the <option selected value> but for the life of me I cannot get the go button to link to the url of $filename
any help is appreciated, thanks 🙂