photo retrieve from database
$sql = "select filename from people where id = 15";
$result = mysql_query($sql);
while ($row = mysql_fetch_array($result))
echo "<img src=\"admin/images/" . $row['filename'] . "\" alt=\"\" /><br />";
Last edited by NogDog; 02-14-2014 at 09:20 AM.
Reason: added [PHP] tags around code
Your subject says you are having trouble retrieving an item from a table. What error are you getting from your query?
Do you have a question about that or some sort of problem with it?
I think he can not see the image with that source code OR he wants to update image into database?
I think we are waiting for the OP to tell us his problem, rather than us guessing.....
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)