After I managed it to insert blobs into my db I'm trying to Display a BLOB from MySQL.
This is the getImage.php:
<?php
  $id = $_GET['id'];
  // do some validation here to ensure id is safe
  $link = mysql_connect("localhost", "root", "root");
  mysql_select_db("user_auth_tutorial");
  $sql = "SELECT image FROM testblob WHERE image_id='$id''";
  $result = mysql_query("$sql");
  $row = mysql_fetch_assoc($result);
  mysql_close($link);
  header("Content-type: image/jpeg");
  echo $row['image'];
?>
Here the HTML:
<img src="getImage.php?id=1" width="200" height="200" />
This is the content of my db:

Unfortunately Dev-Tools throw an internal server 500 Error.
Browser-Output:

Can anybody tell me what I do wrong?
Thank you so much!
 
     
    