Jump to content

help needed to display images from mysql database


cdog1912

Recommended Posts

When i run this code all i get is a blank image window.

can you help?

 

This is the code:

<?php

include 'config.php';

include 'opendb.php';

$_get['content'];

$query  = "SELECT content FROM images";

$result = mysql_query($query);

$row = "mysql_fetch_array('$result'))";

$img = $row['content'];

{

    echo "<img src='?$content?'>";

}

 

include 'closedb.php';

?>

 

Any help would be great thanks :)

<?php

include 'config.php';
include 'opendb.php';

$query  = "SELECT content FROM images";
$result = mysql_query($query);

while ($row = mysql_fetch_array($result)) {
    echo '<img src="' .$row['content']. '" />';
}

include 'closedb.php';
?>

 

A

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.