Auto filling form

if you are trying to get
order form
pre filled shipping details from user details
(and allow to make some changes,which many websites do allow)
then
you have query for data from table again using id or username in session and populate the details in text as show above.

select fields from table where username=sanitize_if_required($_sesssion[‘username’]);
then fields are available to use in form…

Sorry if i got your question wrong.