pictures from database
Posted by: Justyna Cala
Date: April 15, 2013 01:46PM
So I've got images' path stored in my database for each object and I want to display the images on my webpage. I though i could do it for each element with following code:
// Check connection
echo "Failed to connect to MySQL: " . mysqli_connect_error();
$result = mysqli_query($con,"SELECT imagesource FROM staff WHERE id=1");
echo '<img id="steve" src="'. $result . '"' . 'alt="Steve" class="thumbnail" />';
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.