PLz Help
i have some Images in DataBase in Blob field
but images are displayed with a Cross (X) not the actual image
MainPage.php//code
[code=php]
# <?php
# $con = mysql_connect(" localhost","roo t","");
# if (!$con)
# die('Could not connect: ' . mysql_error());
# mysql_select_db ("db1", $con);
# $image = mysql_query("SE LECT * FROM userimagetable" );
# while($imageRes ult = mysql_fetch_arr ay($image) ){
# ?>
# <img src="ViewImage. php?id=<?=$imag eResult['id']?>" alt="Picture" /></td></tr>
# <?php
# }
#
# and the other file displaying image code is
#
# ViewImage.php
# <?php
# $id = $_GET['id'];
# $image = mysql_query("SE LECT * FROM userimagetable WHERE Id='".$id."'");
# $imageResult = mysql_fetch_arr ay($image);
# header("Content-type: image/jpg");
# echo $imageResult['UserImage'];
# ?>
[/code]
i have some Images in DataBase in Blob field
but images are displayed with a Cross (X) not the actual image
MainPage.php//code
[code=php]
# <?php
# $con = mysql_connect(" localhost","roo t","");
# if (!$con)
# die('Could not connect: ' . mysql_error());
# mysql_select_db ("db1", $con);
# $image = mysql_query("SE LECT * FROM userimagetable" );
# while($imageRes ult = mysql_fetch_arr ay($image) ){
# ?>
# <img src="ViewImage. php?id=<?=$imag eResult['id']?>" alt="Picture" /></td></tr>
# <?php
# }
#
# and the other file displaying image code is
#
# ViewImage.php
# <?php
# $id = $_GET['id'];
# $image = mysql_query("SE LECT * FROM userimagetable WHERE Id='".$id."'");
# $imageResult = mysql_fetch_arr ay($image);
# header("Content-type: image/jpg");
# echo $imageResult['UserImage'];
# ?>
[/code]
Comment