right, sorry... I should've known that...
So what I did in the first version of the search is just an
Code: Select all
<?php
if(file_exists($filename)) { print("<a href="$filename.mp3">$filename</a>")}
?>
where $filename was created by form field elements in the POST array.
So would it now be something like
Code: Select all
<?php
preg_match_all("/^[A-Z]+(.\d.\d)(.\d.\d)(.\d.\d)$/i", $filename, $shows);
// and then to print the file names
$show_count = count($shows);
if($shows) { // if any matches were found and placed in $shows
for($i = 0; $i < $show_count; $i++) {
// loop through the $shows array and print a hyperlink to each...
print("<a href="$shows[$i].mp3">Show # $i</a>");
}
}
?>
That's some very rudimentary code, I'm sure, but is this the general idea of how it would work?
and thanks for all of your help. it is much appreciated.