I'm trying insert car information into my database but it's giving me in error every time.
This is the code
if(move_uploaded_file($file_tmp,"productimages/".$file_name))
         {
            $sql="INSERT INTO `products`(`ptitle`, `pprice`, `pdesc`, `modal`, `pcate`, `image`,`feat`,`uid`,`edate`) VALUES ('".$title."',".$price.",'".$desc."',".$modal.",".$cate.",'".$file_name."',0,".$_SESSION["uid"].",'".$edate."')";
            $result=mysqli_query($con,$sql);
            if($result)
            {
            echo "<script>window.location.href='add-car.php?msg=1'</script>";
            }
            else
             {
                echo "<script>window.location.href='add-car.php?error=2'</script>";
             }
         }
         else
         {
            echo "<script>window.location.href='add-car.php?error=2'</script>";
         }
