This has been inserting each line from the csv into the database twice, and now today three times. Nothing else I put in the loop happens more than it should.
$file_handle = fopen("uploads/numbers.csv", "r");
$stmt = $db->prepare("INSERT INTO database
(firstname,lastname,phonenumber) VALUES
(:field1,:field2,:field3)");
while (($line_of_data = fgetcsv($file_handle, 1000, ",")) !== FALSE)
{
$stmt->execute(array(':field1' => $line_of_data [0], ':field2' => $line_of_data[1], ':field3' => $line_of_data[2]));
}