summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
Diffstat (limited to 'index.php')
-rw-r--r--index.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/index.php b/index.php
index c2dca4c..58173be 100644
--- a/index.php
+++ b/index.php
@@ -18,7 +18,8 @@
}
$files = glob("$dir/*.xt");
foreach ($files as $file) {
- echo '<option value="' . htmlspecialchars($file) . '">' . htmlspecialchars(basename($file)) . '</option>';
+ $checked = ($file == $_REQUEST['file']) ? 'selected="selected"' : '';
+ echo '<option value="' . htmlspecialchars($file) . '" '.$checked.'>' . htmlspecialchars(basename($file)) . '</option>';
}
?>
</select>