Question : download pdf file from database in php
Answered by : muhammad-hamza-shabbir
<?php
include 'connection.php';
$sql=mysqli_query($connection,"Select name,content from ekalp where id = (select max(id) from ekalp)");
$result=mysqli_fetch_assoc($sql);
$resu=$result['name'];
?>
<a href="http://YOUR UPLOAD FILE PATH/.<?php echo $resu?>.pdf">Download File </a>
Source : | Last Update : Mon, 04 Jul 22