Re-create a login record table and save the information about each successful login to the database. When you log in next time, just go to the database to get the previous information of the current login record. To put it simply, for example, the database has 3 entries. Data, when I logged in, a new one was added to the database, four together, with IDs 1, 2, 3, and 4; the current login record ID is 4, so I searched for an ID record one level smaller than 4. That’s it
Database fields can be added, created, named,
Re-create a login record table and save the information about each successful login to the database. When you log in next time, just go to the database to get the previous information of the current login record. To put it simply, for example, the database has 3 entries. Data, when I logged in, a new one was added to the database, four together, with IDs 1, 2, 3, and 4; the current login record ID is 4, so I searched for an ID record one level smaller than 4. That’s it
Every time you log in, the current IP is stored in the database.