que tal, miren tengo el siguiente codigo, donde he insertardo un textbox, pero el problema es q no se como declarar para q me busque los archivos pdf, ya tengo el codigo para me muestre el contenido de un directorio todos los pdf. alguien me puede ayudar.
    Código PHP:
   
<body> 
<form method=post action=buscar2.php>
 
buscar
 
<INPUT TYPE="text" size="15" name="caja1">
 
<input type="submit" value="Validar"><br>
<?php 
 
$file=$_REQUEST ["caja1"];
 
 echo "$file <br>";
 
 
function dirImages($dir) {
$d = dir($dir); //Open Directory
while (false!== ($file = $d->read())) //Reads Directory
{
$extension = substr($file, strrpos($file, '.')); // Gets the File Extension
if($extension == ".pdf" ) // Extensions Allowed
$images[$file] = $file; // Store in Array
}
$d->close(); // Close Directory
asort($images); // Sorts the Array
 
return $images; //Author: ActiveMill.com
}
 
$array = dirImages('C:\wamp\www');
 
foreach ($array as $key => $image) // Display Images
{
echo "<a href='$image'>$image</a><br>";
echo '<br />';
} 
?> 
 
 
 
</body>