want to display a table with Name, Age and picture from images folder - need code to insert image - field called Picture in MYSQL Database
Code:
<?php
$con = mysql_connect("localhost","db","pass");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
mysql_select_db("three_rivers", $con);
$result = mysql_query("SELECT * FROM TABLE2");
echo "<table border='1'>
<tr>
<th>Name</th>
<th>Age</th>
<th>Picture</th>
</tr>";
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td>" . $row['Name'] . "</td>";
echo "<td>" . $row['Age'] . "</td>";
echo '<td>' . "<a href='['Picture']<img src='$[Picture]' alt='$[Picture]' width='220' height='220'></a>" . '</td>';
echo "</tr>";
}
echo "</table>";
mysql_close($con);
?>
Comment