Jump to content

Download question


metalhead41

Recommended Posts

Just tried this, but it doesn't seem to want to work. This is my current code:

<?php
include 'library/config.php';
include 'library/opendb.php';

$query  = "SELECT id, name FROM upload";
$result = mysql_query($query) or die('Error, query failed');
if(mysql_num_rows($result) == 0)
{
echo "Database is empty <br>";
} 
else
{
while(list($id, $name) = mysql_fetch_array($result))
{
	{
		echo "got filename from db<br />";
	}
?>
<a href="download.php?id=<?=$id;?>"><?=$name;?></a><br />
<?php		
}
}
include 'library/closedb.php';
?>

Link to comment
https://forums.phpfreaks.com/topic/91541-download-question/#findComment-468970
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.