Enter data in a table, from another table

1

I am creating a PHP logeo system, and so far the registration table works perfectly. Registry has attributes such as the auto-incremented id, the user, the password and the email.

I need to create another table called levels, since the purpose of the page is to overcome certain levels. This table aims to have attributes such as the user, and the levels, so that an update can be made from the page to that table every time someone has passed a level.

Now, I have no idea how I could get the value 'user' in the table levels, extracting it from the table 'Registration'.

I've been looking at relationships (I have very little idea about it) and I think it could be a solution, but as much as I tried I have not got anything.

It has occurred to me the fudge that when the user registers (insert the data in the record table) he also does it in the table levels. But I think that carrying out two consultations would be sloppy.

In the worst case I'll do it that way, but just in case there's some easier way?

Thanks for the answers.

    
asked by Omar 17.03.2018 в 02:45
source

0 answers