Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

You can use $wpdb to access any database you have access to (credentials for) so one site or the other could access its partner's database or both could access a third database. It shouldn't be hard but you will need to write most of the SQL to do it.

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.

share|improve this answer
    
Thank you for the help, I am just trying to figure out how I can go about solving this problem. –  Tangy Jun 23 '13 at 23:24

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.