this is the code that I have been using to try and connect to a database and retrieve data from it but it's not showing images properly. All other content is displayed properly.
//This php quote is test2.php
<?php
$dbhost='localhost';
$dbuser='root';
$dbpass='';
$db='dynamic';
$con = mysql_connect("localhost","elemental","");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_selectdb($db);
?>
<?php
include 'test2.php';
$query="selelct * from data";
$result=mysql_query($query);
while ($data=mysql_fetch_array($result)) {
echo '<h3>' . $data['id'] . '</h3>';
echo '<h3>' . $data['name'] . '</h3>';
}
?>