HEY ALL-
I am trying to display an image that is stored in an access database as an OLE object onto a web page. But when I run my code i only see binary on the site... can someone look at this code and help me out.
<html>
<head>
</head>
<body>
<?php Header ("Content-type: image/gif");
$user="";
$pass="";
$DSN="cs345s04";
import_request_variables('p','p_');
$connect = odbc_connect($DSN,$user,$pass);
$query = "SELECT InsertP2 FROM Pics WHERE (CDDBNumber = 1)";
$res1 = odbc_exec($connect, $query);
$row = odbc_fetch_row($res1);
$ans = odbc_result($res1,1);
print $ans;
odbc_close($connect);
?>
<img src="searchresult.php?$ans">
</body>
</html>