I heard that it's not a good practice to save the image itself in the database, so I did is to save the file name and it's size at the same time, the actual image will save in a folder I call 'images', and I did it working. The problem is the image is not working properly when showing, the result is a torn paper icon.
below are my codes.
$show = mysql_query ("SELECT MAX(id) AS mid FROM upload ") or die (mysql_error());
while ($row=mysql_fetch_array ($show))
echo "<img src = 'images/".$row['mid'].">";
I tried to get the source code to display the name that matched in my query.
Any help would be appreciated.