画像を表示しようとしていますが、私の Web ページには代わりにエンコーディングが表示されます。以下は私のコードです:
<?php ob_start();?>
// html markups goes here
<?php include 'login.php';
if(isset($_GET['productid'])){
$productid = $_GET['productid'];
$sql = "select tyre_image from tyres where product_id = '$productid'";
$result = mysql_query($sql) or die(mysql_error());
header("Content-type :image/jpg");
echo mysql_result($result,0);
}
ob_end_flush();
?>
$_GET associative array($_GET['variable']) を使用して、別のページのリンクから製品 ID を取得しています。
どうすればこれを修正できますか?