I want to read .csv file in PHP and put its contents into the database. I wrote the following code:
$row = 1;
$file = fopen(\"qryWebsite.csv\", \"r\");
while
You can try the below code. It works perfect for me. I have comment to make it more understandable. You can take reference from this code.
Entered data having id = " .$id. " successfully
";
$id++;
}
echo "
Congratulation all data successfully inserted
";
fclose($handle);
}
//close the connection
mysql_close($conn);