I have two wordpress websites and I want to store the data submitted by the forms in a centralized database in order to better manage the information.
Is there a way I can store form data in a different database?
You can use
If you are in a position to refactor this, you could consider having both sites share the same database, via distinct database prefixes, and then save to custom table instead of bothering with access to multiple databases.
Your question is not really specific enough to allow for a more detailed answer.