error Please select an imageError: Duplicate entry '' for key 'img'
`
//file properties
$file = $_FILES['image']['tmp_name'];
if(!isset($file))
echo "Please select an image";
else
{
$image = addslashes(file_get_contents($_FILES['image']['tmp_name']));
$image_name = addslashes($_FILES['image']['img']);
$image_size = getimagesize($_FILES['image']['tmp_name']);
if($image_size==FALSE)
echo "That's not an image.";
else
{
{
if(!$insert = msql_query("INSERT INTO shop (id, img, name, description, price, product_qty, product_category,imagesize)
VALUES ('','$image_name', '','','','','','$image')"))
echo "Problem uploading image.";
else
{
$lastid = mysql_insert_id();
echo "image uploaded.<p />Your image :<p /><img src=get.php?id=$lastid>";
}
}
}
}