Hey bob thanks for ur help 
But still stuck in it 

2nd file.I named it image.php

<?php
$dbhost='localhost' ;
 $dbuser='root' ;
 $dbpass='123456' ;
 $dbname='image' ;
 $tbl_name='images' ;
 $conn=mysql_connect($dbhost,$dbuser, $dbpass) or die ('Error in Connecting to 
database');
   mysql_select_db($dbname) ;


if (isset($_GET['i']))
{
$query = "SELECT image, image_type FROM images WHERE image_id=" . $_GET['i'];
if ($query_result = mysql_query( $query))
{
$image = mysql_fetch_array($query_result);
header("Content- type: $image[1]");
echo $image[0];
}
mysql_close( );
}
?>

and HTML file name show.htm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional/ /EN" "http://www.w3. 
org/TR/xhtml1/ DTD/xhtml1- transitional. dtd">
<html xmlns="http://www.w3. org/1999/ xhtml" xml:lang="en" lang="en">
<head>
<title>Test</title>
<meta http-equiv=" Content-Type" content="text/ html; charset=iso- 8859-1" />
</head>
<body>
<div><img src="image.php? i=1" alt="Image description"/></div>
</body>
</html>


and the out put is --->Image description (no image)
       
---------------------------------
Boardwalk for $500? In 2007? Ha! 
Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.

[Non-text portions of this message have been removed]

Reply via email to