Good morning! I have a panel where several PDF files are posted, however there are 3 different folders according to each file type. And in that panel, I need to put a method where the person can view the file. But I do not know how to do this search in different folders.
Here is the snippet of code that lists the files:
</tr>
<?
$sql = "SELECT * FROM 'pdf'";
$query = mysqli_query($conectar, $sql);
//var_dump($resultado);exit;
while($listar = mysqli_fetch_assoc($query)){
?>
<tr>
<td><?=$listar["nome"]?></td>
<td><?if($listar["tipo"] == 1)echo"Licitações";
if($listar["tipo"] == 2)echo"Edital";
if($listar["tipo"] == 3)echo"Legislação";?></td>
<td><a href="" class="btn btn-default" target="_blank">
<span class="glyphicon glyphicon-download"></span> Download</td>
<td><a href="" class="btn btn-default btn-sm help" data-toggle="modal" title="Excluir PDF"><span class="glyphicon glyphicon-trash"></span></a></td>
</tr>
<?}?>
As you can see, there is the Uploads folder, and within the legislation, bids and edicts. Where is each file type. When listing, I put it to download the file, but I do not know how to fetch that file in different folders.