Connection is ok.in one file I was trying to display the image I uploaded...in another page using the url ...!!!
That was working fine a day before ..but now instead of image it is showing plenty of peculier chars...!!!
Let's see my code
Code: Select all
<?php require_once("session_con.php");?>
<?php require_once("functions.php");?>
<?php confirm_logged_in();
//connect to the database server and the database
dbconnect();
//session data fetching for test
$id= $_SESSION['suid'];
//Get data from the prevoius page
//$id = $_GET['user_id'];
//echo $id;
//Checking the get data is valid or empty
if(is_int($id))
{
echo "No image available";
}else{
//Select image from the database
$sqlf="SELECT * FROM `user_image` WHERE `user_id` = '".$id."';";
$resultf = mysql_query($sqlf) or die(mysql_error());
$row = mysql_fetch_array($resultf) or die(mysql_error());
$fdata = $row['FileData'];
$ftype = $row['MimeType'];
$fname = $row['FileName'];
//$fcontent = mysql_result($result,0,"FileData");
//$ftype = mysql_result($result,0,"MimeType");
header('Content-type: $ftype');
echo $fcontent;
}
?>
Thank You..in advance