I want to create an online pokemon game. And I had a question, how to make a picture of a pokemon in registration, but at the same time when I chose it, so that it later appeared in my profile, but not just a picture, but a pokemon with stats, level, lives and attacks, how to do it? Please help.
Closed due to the fact that the essence of the question is not clear to the participants Visman , Aries , Vladimir Glinskikh , cyadvert , PashaPash ♦ 24 Oct '15 at 7:42 .
Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .
2 answers
There is a table of Pokemon with their stats and description, there is a table of users with their data. When registering with a user in a designated field, after selecting a pokemon, you enter the pokemon ID there, and you will have a permanent bundle of your user with the pokemon, you can choose several pokemons, it is not necessary for the user to do a lot of fields, it’s enough to store the ID for example, separated by commas or a space in one field.
A question from the category "I want everything at once, help."
On the topic: in the registration form, make the connection between the Pokémon from the base and what the user chooses (picture). If the registration is successful, the selection record will be in the database and everything will be further manipulated.