I am developing a system and I got this error when I tried to upload .csv file into database.
Waing: fopen() [function.fopen]: Filename caot be empty in C:xampphtdocscubaanimportcsv.php on line 14
which refer to my coding,
if(isset($_POST["submit"]))
{
$file = $_FILES['file']['tmp_name'];<--line 14
$handle = fopen($file, "r");
$c = 0;
$row = 1;
while(($filesop = fgetcsv($handle, 1000, ",")) !== false)
{
if($row == 1)
{
$row++; continue;
}
$num = count($filesop);
$id = $filesop[0];
$name = $filesop[1];
$address = $filesop[2];
$contact1 = $filesop[3];
$contact2 = $filesop[4];
$department = $filesop[5];
$lokasi = $filesop[6];
the data contain inside the file is not uploaded into the database. I have look for the same error in the other question but nothing working.
