I am trying to dynamically display a picture based on the the entry on the database. I can see i am able to build the url from where the picture has to be fetched but it doesn't display the picture.. I am not able to figure out what is happening.. any help will be appreciated.
// Connect to the database
$dbhost = 'localhost';
$dbusername = 'vote';
$dbpasswd = 'vote';
$database_name = 'vote_active';
$connection = mysql_connect("$dbhost","$dbusername","$dbpasswd")
or die ('Couldn\'t connect to server.');
$db = mysql_select_db("$database_name", $connection)
or die('Couldn\'t select database.');
$sqlMain = ("SELECT DISTINCT number, comments, Engineer, votes FROM active_nomination;");
$lqlMain = mysql_query($sqlMain) or die(mysql_error());
while($lplMain = mysql_fetch_assoc($lqlMain)){
$enge = utf8_encode($lplMain['Engineer']);
//print $enge;
$url= "http://wwwin.kabi.com/dir/photo/prof/$enge.jpg";
print $url;
echo
'<td>;
<img src="<?php $url ?>" />
</td>';
}
?>