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