Upload file code

<?php
//connecting to database
$db = mysql_connect("localhost:3306","root","") or die(mysql_error());
//selecting our database
$db_select = mysql_select_db("uploadimage",$db) or die(mysql_error());
if(isset($_POST['upload'])){//button for Upload
$target_path = "uploads/";
$target_path = $target_path . basename($_FILES['uploadedfile']['name']);
if (move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
$query =mysql_query( "INSERT INTO image1 (name) values ('$target_path')");//insertion to database
echo "The file " . basename($_FILES['uploadedfile']['name']) . " has been uploaded";
header('Location: pdffile.php');
}
else {
echo "There was an error uploading the file, please try again!";
}
}
?>




fdpf code

<?php
require("fpdf.php");
class PDF1 extends FPDF
{
// Page header
function Header()
{
// Logo
$this->Cell(0,10,'APPLICATION FORM FOR ADMISSION INTO MEDICAL PG DEGREE/DIPLOMA COURSES',0,0,'C');
$this->Ln(6);
$this->Cell(0,10,'UNDER MANAGEMENT QUOTA FOR THE ACADEMIC YEAR 2014-2015',0,0,'C');
$this->Ln(6);
$this->Cell(0,10,'-----',0,'C');
// Line break
$this->Ln(15);
}
}
$link=mysql_connect('localhost:3306','root','');
mysql_select_db('uploadimage');
$pdf = new PDF1();
$pdf->AddPage();
$query=mysql_query("select name from image1 where id=1");
$result = mysql_query($link, $query);
header("Content-type: image/jpeg");
$row=mysql_fetch_row($result);
$name=$row[0];
$pdf->Image($name);
$pdf->Cell(0,10,'id'.$row['id'],0,1);
$pdf->Cell(0,10,'name'.$row['name'],0,1);
$pdf->Output(".pdf");
header('Location: '. ".pdf");
?>

Please help sir iwant to display the image in pdf from the imagepath