I'm trying to display an image using a field gathered from mySQL db.
Any ideas why it ain't working (please not im not too experienced with php/mysql so descriptions please)
<html>
<body>
<?php
include("config.inc");
// connect to MySQL
$db = mysql_connect($dbhost,$dbuser,$dbpasswd);
mysql_select_db($dbname,$db);
$photo = mysql_query("SELECT * FROM testImages");
$results = "http://www.google.com/images/logo.gif";
$result = mysql_query("SELECT * FROM testImages",$db);
$foto = printf(mysql_result($result,"first"));
print "<IMG SRC=$foto>";
?>
</body>
</html>