Here is my segment of code I am using
$results = mysql_query("Select * from $table");
echo "<table border=\"1\">";
while ($row = mysql_fetch_assoc($results)):
echo "<tr><td>{$row['filename']}</td><td>{$row['filetype']}</td>
<td>{$row['filesize']}</td>
<td><img height=\"40\" width=\"40\" src=\"{$_SERVER['PHP_SELF']}?action=view&fileid={$row['fileid']}\" /> </td>
<td><a href=\"{$_SERVER['PHP_SELF']}?action=download&fileid={$row['fileid']}\">Download</a></td></tr>";
endwhile;
echo "</table>";
My images always come up broken. what am I doing wrong?
$results = mysql_query("Select * from $table");
echo "<table border=\"1\">";
while ($row = mysql_fetch_assoc($results)):
echo "<tr><td>{$row['filename']}</td><td>{$row['filetype']}</td>
<td>{$row['filesize']}</td>
<td><img height=\"40\" width=\"40\" src=\"{$_SERVER['PHP_SELF']}?action=view&fileid={$row['fileid']}\" /> </td>
<td><a href=\"{$_SERVER['PHP_SELF']}?action=download&fileid={$row['fileid']}\">Download</a></td></tr>";
endwhile;
echo "</table>";
My images always come up broken. what am I doing wrong?