Kurze Antwort
Einfach echo
die URL des Bildes im src
ausgeben -Attribut und das Bild wird angezeigt.
<img id="result_img" src="<?php echo $imagelink; ?>" />
Bewährte Lösung:
Tabellendesign:
images
| id | title | link | imagelink | description |
------------------------------------------------------------------------
| 1 | Some Title | http://www.google.com | myimage1.png | Some text |
------------------------------------------------------------------------
| 2 | My Title | http://www.yahoo.com | myimage2.png | Some text |
SQL-Abfrage
SELECT title, link, imagelink, description FROM images WHERE id = ?
PHP
<?php
$stmt = $mysqli->prepare("SELECT title, link, imagelink, description FROM images WHERE ID = ?");
$stmt->bind_param("i", $ID);
$stmt->execute();
$stmt->bind_result($title,$link,$imagelink,$description);
$stmt->fetch();
?>
<div class="pagination" style="display:inline">
<ul style="background-color:#">
<li><div class="span3_search">
<h2><a href='<?php echo $link; ?>'><b><?php echo $title; ?></b></a></h2>
<br />
<img id="result_img" src="<?php echo $link; ?>" />
<br />
<?php echo $description; ?>
<br />
<a href='<?php echo $link; ?>'><?php echo $link; ?><br /><br /></a>
<p></div>
</li>
</ul>
</div>