How does php obtain the username of the current client login user? for example, how do I get the username of the current client login and insert it into the database? Thank you ------ solution -------------------- when logging on, save a unique identifier in the SESSION, for example, when the user table ID field value is obtained, the SESSION is used to find the user data you need. ------ How does php obtain the username of the current client login user?
How does php get the username of the current client login user? for example, I want to create a forum. how can I get the username of the current client login and insert it into the database? thank you!
------ Solution --------------------
During login, a unique identifier is saved in the SESSION, for example, the user table ID field value.
The SESSION is used to find the user data you need.
------ Solution --------------------
HTML code
> ". $ _ SESSION ['user'];?>