row['filename']
below contains a filename fetched from database. I want to send the filename to download_file.php
when the link is clicked.
<?php
//other code
$filename=$row['filename'];
echo '<a href="download_file.php?name=$filename">' . "See file name" .'</a>';
?>
but in download_file.php
I get only the word $filename
instead of its value (the actual filename fetched from the db). How can I pass the value of $filename
to download_file.php
? Where did I go wrong in my code?