<?php
include "opendb.php";
$sql = "SELECT * FROM tbl_Files ";
$sql .= "ORDER BY filename ASC";
echo "<table border='1'>\n";
echo " <td>Filename:</td>\n";
echo " <td>Type:</td>\n";
echo " <td>Size:</td>\n";
echo " <td>Description:</td>\n";
echo " <td>Download Link:</td>\n";
for ($i = 0; $i < $rows; $i++) {
// since our script is very small, i'm not going to escape out to html mode here
echo " <td>$data->filename</td>\n";
echo " <td>$data->filetype</td>\n";
echo " <td>$data->filesize</td>\n";
echo " <td> <a href='download.php?id=$data->id_files'>Click to Download</a> </td>\n";
}
?>