Click name to get user information by id

I have a table with the following fields:
email - name - username - userid
currently the data in this table is pulled into a html table.

In a seperate table i have all the user’s data / information.

What i would like to do is click on a name from the first table (consisting of email - name - username)

And have that users information shown on its own like a report generation.

Both the tables have the same unique userid’s applied so could someone enlighten me as to the best way to do this?


One easy way to do this is to make the name a link like this:

<a href=“one_users_info.php?userid=$userid”>$username</a>

Then on your one_users_info.php page, you access the $_GET[‘userid’] and pull just that user’s information.

Let me know if I misinterpreted your question.

It should be like this…

<a href=“one_users_info.php?userid=<?=$userid?>”><?=$username?></a>

I couldnt actually use that way due to the way the names were being populated but i did figure it out - thanks for your help guys.