Can anyone help for this. In my project i uploaded files by using this query

@list(, , $imtype, ) = getimagesize($_FILES['photo']['tmp_name']);
// Get image type.
// We use @ to omit errors
if ($imtype == 3) // cheking image type
$photo_ext="png"; // to use it later in HTTP headers
elseif ($imtype == 2)
elseif ($imtype == 1)

$photo = file_get_contents($_FILES['photo']['tmp_name']);
$photo = mysql_real_escape_string($photo);

if($photo!=''){ $db->execute("UPDATE `emp_personal` SET `photo`='$photo', `photo_ext`='$photo_ext' WHERE `emp_id` ='$emp_id'");}

Upto some days it worked but, now it didn't give error and files are not uploaded. In this code files are not transfer to any folder only insert into database and accessed by some php code.

why this problem comes, any limit in saving or what reason can anyone suggest??

Thanks in advance