Sorry for double posting , posted 1 thread in the wrong forum because its obviously more related to php than sql.
database "dota2"
table "images"
id(int11)
pics(blob)
ext(varchar4)
gender(varchar7)

now i have 1 image stored "id" 5 "pics" [BLOB - 1.4 KiB] "ext" jpg "gender" china
storing code
PHP Code:
$con mysql_connect("localhost","root","aa");
if (!
$con)
  {
  die(
'Could not connect: ' mysql_error());
  }


echo 
"Success! You have connected ";

$handle fopen("ch.jpg""rb");
$img fread($handlefilesize('ch.jpg'));
fclose($handle);
if (!
$img)
{echo
"not working";}

$img base64_encode($img);
 
mysql_connect("localhost","root","aa") or die(mysql_error()); 
 
mysql_select_db("dota2") or die(mysql_error()); 
$sql "INSERT INTO images(id, pics, ext, gender) values (null,'$img','jpg','china')";
mysql_query($sql) or die('Bad Query at 12');
echo 
"Success! You have inserted your picture!"
showing code
PHP Code:
header("Content-type: image/jpg");
$con mysql_connect("localhost","root","aa") or die(mysql_error()); 
mysql_select_db("dota2");
$getImage mysql_query("SELECT pics FROM images WHERE id = 5") or die(mysql_error());
$row_getImage mysql_fetch_array($getImage$con);

echo 
$row_getImage['pics'];
mysql_free_result($getImage); 
shows error " the image "http://localhost/test2/showimage.php" cannot be displayed ebcause it contains errors", any help ?