Passing results from query to variables for use on many other pages

Seems like you are making it more complicated than it needs to be to display user data.

Have a look at the following tutorial.

Unless I totally misunderstand what you are trying to do.