I am uploading a file in php and only want to upload it if it's a csv file. I believe my syntax is right for the content type. It always goes to else statement when it's a csv file. What I am doing wrong here?
if (($_FILES["file"]["type"] == "text/csv"))
{
}
else
{
}
If I change the content type it works for that format just not csv.
simple use "accept" and "required" in and avoiding so much typical and unwanted coding.