I always have trouble mixing languages and I recently started with MYSQL. In this case I have this code:
<?php
$data = mysql_query("SELECT * FROM Badges")
or die(mysql_error());
while($info = mysql_fetch_array( $data ))
{
Print "http://www.google.com/s2/favicons?domain=".$info['Website'] . "";
}
?>
And I need it to print an image instead of the link it’s printing.
http://www.google.com/s2/favicons?domain=“.$info[‘Website’] . ” being the image’s url
How would that be written? Thanks a lot
Some other tips…
mysql_*are old functions, PDO is much better to use now it is available.or die()is old too – have you considered exceptions?echois more commonly used thanprint, and you should use the case that is stated in the manual, e.g.printinstead ofPrint.