Forum Moderators: open
Oddly enough when the url of the script is visted the title bar states "JPEG Image, 1024x768 pixels" (Firefox) which is spot on - yet all that appears is a completely blank/white image (1024x768 pixels, but only 4.00 KB in size).
Is there something wrong with the script?
<?php
$myServer = "XYZPC\SQLEXPRESS";
$myUser = "sa";
$myPass = "#*$!#*$!X";
$myDB = "YYYYY";
$dbhandle = mssql_connect($myServer, $myUser, $myPass, true) or die("Error1");
$selected = mssql_select_db($myDB, $dbhandle) or die("Error2");
$query = "SELECT image FROM abc WHERE id=999";
$result = mssql_query($query,$dbhandle);
$content=mssql_result($result, 0, "image");
header('Content-type: image/jpeg');
echo $content;
?>