Displaying images in web pages
from the Artful MySQL Tips List
The simplest way to display images in HTML is directly from the image file, eg ...
<align="center"><img src="name-of-image.png"> </p>
which is one reason it's often recommended that you store such images directly on disk, and store paths to them in the MySQL database, so in PHP you can write ...
$res=mysql_query(...) or exit( mysql_error() );
$row=mysql_fetch_row( $res ) or exit( mysql_error() );;
$picpath=$row[0];
echo "<p; align="center"><img src='$picpath'> <p>";
Return to the Artful MySQL Tips page