Hello kiwi2, please use [ php] and [ /php] (without spaces) to encase your code it makes it much easier to read.
You have an unclosed quote with your img src= statement:
<img src="<?php echo $row->imagedata;?> />"
<!-- This should be: -->
<img src="<?php echo $row->imagedata;?>" />
If that doesn't work, list out the data located in your database. You should also allow it to handle more than 1 result... (see below)
<?php
if ((!isset($_GET['id']) || trim($_GET['id']) == ' ')) {
die('missing record ID!');
}
$connection = @mysql_connect("localhost" , "root")
or die ('Unable to connect!');
@mysql_select_db($db) or die ('Unable to select');
$id = $_GET['id'];
$query = "SELECT imagedata FROM pixs4 WHERE id = '$id'";
$result = @mysql_query($query)
or die ("ERROR: $query. " . mysql_error());
if (mysql_num_rows($result) >= 1) { // If there is 1 or more...
while ($row = mysql_fetch_object($result)) {
echo "The data pulled from the database is: $row->imagedata<br />";
?>
<p>
<b> <!-- <img src="<?php echo $row->imagedata;?> "/> -->
<?php
} // End While
} else {
?>
<p>
<font size="-1">That image could not be located.</font>
<?php
} // end if mysql_num_rows...
mysql_close($connection);
?>
If the information that comes out "should work" i.e. copy & paste it into your browsers Location Bar, and if you see the image, voila, perfect, just uncomment the html img statment (html comments are: <!-- --> just in case.)
Additionally, you should look into SQL Injection. You can use mysql_real_escape_string
Best of luck