Hi,.
when i display the image by using below code i got the error as image displayed in the form of garbage value format.plz tell that what's the mistake in my code.
[PHP]
<?php
mysql_connect(" localhost", "root", "root") or die(mysql_error ());
mysql_select_db ("rainlist") ;
$result = mysql_query(spr intf("SELECT * from pix WHERE pid = 1", $_GET['pid']));
echo "SELECT * from images WHERE pid=".$_GET['id'];
$row = mysql_fetch_arr ay($result);
header("Content-type: image/jpeg");
$image=$row['imgdata'];
echo $image;
?>
[/PHP]
when i display the image by using below code i got the error as image displayed in the form of garbage value format.plz tell that what's the mistake in my code.
[PHP]
<?php
mysql_connect(" localhost", "root", "root") or die(mysql_error ());
mysql_select_db ("rainlist") ;
$result = mysql_query(spr intf("SELECT * from pix WHERE pid = 1", $_GET['pid']));
echo "SELECT * from images WHERE pid=".$_GET['id'];
$row = mysql_fetch_arr ay($result);
header("Content-type: image/jpeg");
$image=$row['imgdata'];
echo $image;
?>
[/PHP]
Comment