I was thinking something like:
Code: Select all
$term = trim($_POST['search']);
$files = glob($dir."/files/*".$term."*");Code: Select all
function printr ( $files , $term = '' ) {Moderator: General Moderators
Code: Select all
$term = trim($_POST['search']);
$files = glob($dir."/files/*".$term."*");Code: Select all
function printr ( $files , $term = '' ) {Code: Select all
print_r($files);Code: Select all
<form action="" method="POST"><input size="25" type="text" name="query" value=""> <input type="submit" value="Search"></form>
<?php
$term = trim($_POST['search']);
$files = glob($dir."files/*".$term."*");
print_r($files);
?>Code: Select all
<form action="search.php" method="POST"><input size="25" type="text" name="query" value=""> <input type="submit" value="Search"></form>
<?php
$files = glob($dir."files/*".$term."*");
$term = trim($_POST['query']);
print_r($files);
?>Code: Select all
<form action="search.php" method="POST"><input size="25" type="text" name="query" value=""> <input type="submit" value="Search"></form>
<?php
$term = trim($_POST['query']);
$files = glob($dir."files/*".$term."*");
print_r($files);
?>