I have a database with some tables in it. I want now on my website has the dropdown and the choices are the names of people from a column of the table from my database and every time I click on a name it will show me a corresponding ID also from a column from this table. how I can do that? or maybe a guide where should I find an answer !
many thanks!!!
You have to do that in python(if that's what you are using in the backend). 
You can create functions in python that gets the list of name of tables which then you can pass to your front-end code. Similarly, you can setup functions where you get the specific table name from HTML and pass it to python and do all sort of database queries.
If all these sounds confusing to you. I suggest you take a Full stack course on udemy, youtube, etc because it can't really be explained in one simple answer.
I hope it was helpful. Feel free to ask me more
SelectField to create dropdown menu