title: FPDF error: Unsupported image type: image/jpeg
body: <pre><code>if(isset($_POST['sumit']))
    { 
  
     $con = mysqli_connect("localhost","root","","school");
         if (mysqli_connect_errno())
    {
    echo "Failed to connect to MySQL: " . mysqli_connect_error();
    } 
  
   $sname=$_POST['sname'];
    $category=$_POST['category'];
   $sadd=$_POST['sadd'];
   $file_name=$_FILES['file']['name'];
    $temp_name=$_FILES['file']['tmp_name'];
    $file_size = $_FILES['file']['size'];
   $file_type = $_FILES['file']['type'];
  
     $target_path  =  "Newfolder1";
  $sql="SELECT * FROM imagetable WHERE   sname='$sname' and sadd='$sadd'and category='$category' and file='$target_path'";
   $result1 = mysqli_query($con, $sql);
    if(!mysqli_query($con, $sql)){
                  die( "Could not execute sql: $sql"); 
                   }
  $row = mysqli_fetch_row($result1);
  $file=$row[0];
  
  
    $pdf=new fpdf();
  $pdf-&gt;ADDPage();
  $pdf-&gt;setfont('Arial','B', 16);
  
  $pdf-&gt;Image($file,150,25,50,20,$file_type);
  
  
  $pdf-&gt;Cell(0,10,'id',0,1);
  $pdf-&gt;Cell(0,10,'sadd',0,1);
  $pdf-&gt;Cell(0,10,'category',0,1);
  $pdf-&gt;Cell(0,10,'sname',0,1);
  
  $pdf-&gt;Output();}
  </code></pre>
  
  <p>This is giving me the image type but all this is being done through database
  my image type is being defined in the db but I don't know. I'm gettting the error.
  If anyone could find out the error please reply </p>