Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have 3 table . .
Regismain, regisper, regisdp
No relation provide In these tables.

After login home page redirect
In home page I declare a user name which is logged in using session
N
Now I want to display profile of user which is logged in using session, how to display profile of logged in user ???
Posted
Comments
Mohibur Rashid 25-Jun-14 18:01pm    
you can access your user name with $_SESSION variable. You can figure out rest

1 solution

you must have declared the username using the php $_SESSION variable, if username is your primary key in DB tables, you can make queries regarding all you want to display, like Select * from regismain where username=$_SESSION{'username']....

in case your username is not the primary key it is something else like userid or something there seems to be no sense of declaring username on logging in, you must declare the variable which is a primary key in database tables and hence you can perform queries on it to display results.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900