<?php					
	$con = mysql_connect("localhost","root","");
	mysql_select_db("student_portal",$con);
	
	$query = "SELECT * FROM matric_results";
	$result = mysql_query($query,$con);
	
	while($row = mysql_fetch_array($result))
	{
		$imageData = $row['image'];
		header("content-type: image/*");
		echo $imageData;
	}
	mysql_close($con);
?>