I have a CSV file, comma delimited which automatically uploaded to a database. Its all running smoothly.
My problems How can i avoid/filter if someone accidently upload rubbish file(non-csv formatted file). In my code it will ruin MySQL.
If you're using fgetcsv() then can't you just check the returned array to ensure it matches whatever validation rules you have?