Xianoth Posted September 5, 2007 Share Posted September 5, 2007 Ok.. After getting my code working and all, I am going through the refining process after the feedback I am getting.. So, if you check out my previous post: http://www.phpfreaks.com/forums/index.php/topic,156919.msg682259.html#msg682259 You will see the synopsis of my project. Now however I need to tweak the code on the backend of the user interface. $input = $_POST['ext']; $file_dir="./files"; $dir=opendir($file_dir); while ($name=readdir($dir)) { if ($name != "." && $name != "..") if (strstr(strtolower($name), $input)) { echo "<a href=\"get.php?name=$name\" target=_blank>".$name."</a>"; echo "<br />"; } } Now this works.. What I need to do is to add a character to the $name value. The inputs are extension numbers, and the filenames are saved with a "-" before the number in the filename. So say ext 111 would actually be -111 in the filename. What would I have to do to modify my script to include a simple "-" ? Any help is appreciated! Thanks! Link to comment https://forums.phpfreaks.com/topic/68069-stumped-on-a-search-issue/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.