// Example php script to demonstrate the direct passing of binary data // to the user. More infos at http://www.phpbuilder.com // Syntax: getdata.php3?id= if($id) { // you may have to modify login information for your database server: @MYSQL_CONNECT("localhost","webuser","webuser"); @mysql_select_db("polk"); $query = "select bin_data,filetype from reviews_images where id=$id"; $result = @MYSQL_QUERY($query); $data = @MYSQL_RESULT($result,0,"bin_data"); $type = @MYSQL_RESULT($result,0,"filetype"); Header( "Content-type: $type"); echo $data; }; ?>