5000) { http_response_code(400); exit('error: data tidak lengkap'); } $stmt = $conn->prepare( "INSERT INTO masjid (nama_masjid, pic_masjid, alamat, latitude, longitude, radius, jenis_ibadah) VALUES (?, ?, ?, ?, ?, ?, ?)" ); if (!$stmt) { http_response_code(500); echo 'Gagal prepare: ' . $conn->error; exit; } $stmt->bind_param('sssddis', $namaIbadah, $picIbadah, $alamat, $latitude, $longitude, $radius, $jenisIbadah); if ($stmt->execute()) { echo 'success'; } else { http_response_code(500); echo 'error: ' . $stmt->error; } $stmt->close(); ?>