am trying to upload image into database mysql. but fails. though no error report yet the file isn't find in the database. can someone help me out please?


here is my code
<?
$surname=$_POST["text1"];
echo $surname;
$othernames=$_POST["text2"];
echo $othernames;
$contactadd=$_POST["text3"];
echo $contactadd;
$age=$_POST["text4"];
echo $age;
$payment=$_POST["text5"];
echo $payment;
$paymentcond=$_POST["text6"];
echo $paymentcond;
$picturepath=$_FILES["file1"];
echo $picturepath;
$sex=$_POST["sextype"];
echo $sex;
$job=$_POST["job"];
echo $job;
$stffid=$_POST["text1x"];
echo $stffid;
$paymode=$_POST["paymode"];
echo $paymode;
$fdate1=$_POST["1date1"];
$fdate2=$_POST["1date2"];
$fdate3=$_POST["1date3"];
$admitdate=$fdate3."-".$fdate1."-".$fdate2;
echo $admitdate;

$pixopen="fopen('".$picturepath."',\"r\")";
$pixsize="filesize('".$picturepath."')";
$pixread="fread('".$pixopen."','".$pixsize."')";
$data=addslashes($pixread);
$pix_type="filetype('".$picturepath."')";

$dbconx=mysql_connect("localhost","root");
mysql_select_db("pixupload",$dbconx);
$sql="insert into staffinfo values ('"
.$surname.
"','"
.$othernames.
"','"
.$contactadd.
"','"
.$picturepath.
"',"
.$age.
",'"
.$sex.
"','"
.$job.
"','"
.$admitdate.
"',"
.$stffid.
","
.$payment.
",'"
.$paymode.
"','"
.$paymentcond.
"',"
.$data.
",'"
.$pix_type.
"',"
.$pixsize.
")";
echo $sql;
?>


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" src="CLOCK.JS"></script><script language="JavaScript">
<!--hide from old browsers
defaultStatus="Today\'s date" + ":- " + i +"-" + a +"-" + k + " [" + h + "]";
function displayimg(){
imgsrc=document.pixupload.file1.value;
document.pixupload.staff.src=eval("imgsrc");
}
function call(){
setInterval("displayimg()",3000);
}
//-->
</script>
here is just the main part of the file pls help out. i sent data to this file from a form.
expecting reply soonest.