0
//a table to display file from the database
         <thead class="thead-inverse">  
         <tr>  
          <th>Description </th>
          <th>Category</th>
          <th>Upload By</th>
          <th>Date</th>
          <th></th> 
         </tr>  
         <thead>  
         <tbody class="sc">  
         <?php  
// fetch the records from db
       while ($row = mysql_fetch_assoc($result)) {  
                     ?>  
        <tr>  
             <td><?php echo $row['fdesc']; ?></td> //filename
         <td><?php echo $row['category']; ?></td>
         <td><?php echo $row['username']; ?></td> //user who have upload the file
        <td><?php echo $row['fdatein']; ?></td>
//the download button  
        <td><a href="" ><button type="button" class="btn btn-unique active" data-toggle="tooltip" data-placement="right" title="Download"><i class="fa fa-download"></i> // get the specific to download
                </button></a></td> 
        </tr>  
         <?php  
         }  
         ?>  
         </tbody>  
         </table>
jrbedard
  • 3,662
  • 5
  • 30
  • 34

1 Answers1

1

you can add the id in the the link url like so:

<a href="d1.php?fileId=<?php echo $row['fileID']; ?>" >

then in d1.php the id will be in the variable $_GET['fileID']