how to get the id of a registered user in php? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

how to get the id of a registered user in php?

I need to know the id of the user who is registered to show their data in a section

3rd Jun 2022, 2:37 AM
Ivette Flores
Ivette Flores - avatar
1 Answer
+ 2
Generally the user's username & password is used when logging in, find a record in users table having such username and password (passwords usually are stored in encrypted/hashed form). If the query succeeded, then you might have the user ID in the query result, if ID field was part of the query. What did you mean "show their data in a section"?
3rd Jun 2022, 2:50 AM
Ipang