如何在上面创建下载按钮


//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>

您可以在链接URL中添加id,如下所示:

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

然后在 D1 中.php id 将位于变量$_GET['fileID']

相关内容

  • 没有找到相关文章

最新更新