Problems displaying image Blob

Hi guys

I’m new to PHP. I’m having problems displaying a picture from a Blob. Please please, someone help. This is driving me crazy lol. Here’s what I have so far.

[php]<?php

// connect to mysql server
$link = mysql_connect(‘localhost’, ‘root’, ‘’);
if (!$link) {
die('Not connected : ’ . mysql_error());
}
// connect to database server
$db_selected = mysql_select_db(‘images’, $link);
if (!$db_selected) {
die ('Database error : ’ . mysql_error());
}

    //$sql = "SELECT image * FROM gallery";
	$sql = "SELECT image FROM gallery";

    // the result of the query
    $result = mysql_query($sql) or die("Invalid query: " . mysql_error());

    // Header for the image
    header("Content-type: image/jpeg");
    echo mysql_result($result, 0,'image');

?>[/php]

Sorry, I forgot to say what the problem was. When I run the php page, I get a broken link

Sponsor our Newsletter | Privacy Policy | Terms of Service