Your code does not check if the command was successful. Use something like
if (mysqli_query($conn,"insert into items ( category, subcategory, name, brand, img, price, description ) values ('$cat', '$subcat', '$name', '$brand','$img','$price','$desc' )" ) === TRUE)
{
}
else
{
printf("Insert failed: %s\n", mysqli_error($conn));
}