5000) { http_response_code(400); exit('error'); } $statement = null; try { $statement = mysqli_prepare( $conn, "INSERT INTO masjid (nama_masjid, pic_masjid, alamat, latitude, longitude, radius) VALUES (?, ?, ?, ?, ?, ?)" ); mysqli_stmt_bind_param($statement, "sssddd", $namaMasjid, $picMasjid, $alamat, $latitude, $longitude, $radius); if (mysqli_stmt_execute($statement)) { echo 'success'; } else { http_response_code(500); echo 'error'; } } catch (mysqli_sql_exception $exception) { http_response_code(500); echo 'error: ' . $exception->getMessage(); } if ($statement) { mysqli_stmt_close($statement); } ?>