\n"; $query=mysql_query("INSERT INTO ".$table." (latitude, longitude, ssid, mac, encryption) VALUES ('$lat','$lon','$ssid','$data[4]','$enc')"); if (!$query) { die('Invalid query: ' . mysql_error()); } } fclose($handle); rename("csv/".$file, "csv/backup/".$file); } } ?>