How can I add a new row in a separate database when someone registers via WordPress?
Apologies if this is question is too general or in the wrong location but I am new to SQL, WordPress and web hosting.
So I am a game developer using Unity C# to create a multiplayer game. I am using GoDaddy web hosting, with WordPress for a company website. The goal is to allow users to create WordPress user accounts via the website or in game. When a user is successfully registered on the wp_users database I would like a new row added to a separate database which will contain the user’s in game data (such as games played, won, lost, avatar appearance etc). Upon adding the new row, I would like int fields in the databases filled linking them together by the id indexes. So wp_users has an int column which links to the primary key of the game data database and vice versa. Both databases are currently setup. How would I go about appending the WordPress register code to add in the additional data? Is this the correct way or is there a more traditional way to achieve this that I am missing due to inexperience?
I am more than willing to learn the php/sql code to get this to work but I feel I need pointing in the right direction as currently I am feeling a bit overwhelmed. Thanks!
Leave an answer