<?
   require ("./settings.php");                     //include global DocBase settings
   //---[DB Access]-----------------------------------------------------
      $link = mysql_connect ($dbhost, $dbusername, $dbpassword);
      mysql_select_db($dbname,$link);   
		$sql="SELECT picture from $picture_table where picid=$picid";
		$result = mysql_query ($sql,$link);
		$picture = mysql_fetch_array($result);
		header("Content-type: ".$picture['mimetype']."");
		echo $picture['picture'];
?>
