Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

teampoison's avatar

PHP Download button dynamic from database

i create a form where admin upload a file and file are uploaded on database. Now i create a table on frontend where i will create a download button for download a file that admin are uploaded but i see image text not any download button i also try <a href tag but not work.

Table name: datesheet Column name: course, sheet

 <td><?php echo $rows['coursename'];?></td>
                <td><?php echo $rows['sheet'] ?></td>

File download button add on second td

0 likes
6 replies
Sinnbeck's avatar

This is a button

<button>foo</button>

But in your case I would imagine you want an a tag

<a href="/path/to/download" download>foo</a>
Sinnbeck's avatar

It's a bit confusing that it's tagged as laravel but you aren't using blade syntax. So I assume it isn't actually laravel

Please or to participate in this conversation.