I am trying to create a page that will display info for only the user that is currently logged in. I have figured out how to retrieve info from a DB, but I only want info about the current user. I am new and I am totally lost. If this is already been addressed and I missed it, sorry.
Ok, I am going to be nice here and throw something out. Usually I would tell a person with a question such as this, do your research, read some online tutorials and get a good understanding of php. Try to get something working, and then if you have a problem come talk to us.
But, it is friday and I am killing time so here goes…
If you want to get information about a user that is logged in, you simply run a query that looks for their specific id. When a table is setup most often, an id field is set and set as the primary key that is auto incrementing which will give each user a different id number.
Then when they login you pull the id and usually store it in a session variable which then can be carried across pages. Once the id is needed you can pull it out of the session variable and use it in a query to pull all the information for that single user.
Hope that helps.