Finding error CSV file to mysql while using php

Hello everyone, I am getting error while uploading csv file to mysql. Please advise how I can resolve this.

index page

<?php /** * @author * @copyright 2021 */ $conn = mysqli_connect("localhost","test","","testdb"); if(isset($_POST["import"])) { $filename=$_FILES["file"]["tmp_name"]; if($_FILES["file"]["size"]>0) { $file = fopen($filename[,](https://vysorforpc.com/)"r"); while (($getData = fgetcsv($file,100000,",")) !==FALSE) { $sql = "INSERT INTO employee (ID,E_Name,E_Last,E_Email) VALUES ('".$getData[0]."', '".$getData[1]."', '".$getData[2]."')"; $result = mysqli_query($conn,$sql); if(!empty($result)) { echo "CSV data Imported"; } else { echo "file not uploded"; } } } } ?>
    <form class="form-horizantal" action="" method="post" name="indexphp" enctype="multipart/form-data" >
        <div>
            <label> Csv File </label>
            <input type="file" name="file" accept=".csv">
            <button type="submit" name="import">Import</button>
        </div>
    </form>

Thanks in Advance