Answer the question
In order to leave comments, you need to log in
How to make a selection from the database id = name?
There is a database, it has an id column, and a name next to it.
It is necessary that for each user who is assigned an id, a name is displayed.
I don’t know how to implement it, I’m racking my brains for the second day :(
UPD. Displays only the 1st value from the table.
Answer the question
In order to leave comments, you need to log in
1. When a user logs into his account, save his "id" to the session ($_SESSION['id']) = $id;
2. Then SELECT name FROM table WHERE id = $_SESSION['id'];
If I understand correctly then
SELECT name FROM table WHERE id = 1
Or I didn’t understand something ... o_O
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question