<?phpThis script very simply queries the database and retrieves all of the information in it. It then echos each back until it has shown all the data.
// Connects to your Database
mysql_connect("your.hostaddress.com", "username", "password") or die(mysql_error()) ;
mysql_select_db("Database_Name") or die(mysql_error()) ;
//Retrieves data from MySQL
$data = mysql_query("SELECT * FROM employees") or die(mysql_error());//Puts it into an array
while($info = mysql_fetch_array( $data ))
{
//Outputs the image and other data
Echo "<img src=http://www.yoursite.com/images/".$info['photo'] ."> <br>";
Echo "<b>Name:</b> ".$info['name'] . "<br> ";
Echo "<b>Email:</b> ".$info['email'] . " <br>";
Echo "<b>Phone:</b> ".$info['phone'] . " <hr>";
}
?>
To show the image, we just use normal HTML for the image, and only change the last part (the actual image name) with the image name stored in our database. For more information on retrieving information from the database, read this tutorial.

