How do you concatenate this $file shows up for the showname?
This is not working...
$thelist .= "<a href=\"page2.php?showname='.$file'">$file</a><br>";
I would write it as:
$thelist .= '<a href="page2.php?showname=' . urlencode($file) . '">' . htmlspecialchars($file) . '</a><br>';
That worked great Laserlight. Thanks.