In a session, how a usr get their database info?

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
towline_5
Forum Newbie
Posts: 3
Joined: Thu Jul 17, 2003 10:08 pm

In a session, how a usr get their database info?

Post by towline_5 »

Once someone has logged in through my authentication site and a session has been started, how can I show them all their data (e.g. an ability to see their past transactions and their user info)? :oops:
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You need to have some way of linking all of the information about the user - do they have a user id that you can use to query the database to grab all of their information?

Mac
towline_5
Forum Newbie
Posts: 3
Joined: Thu Jul 17, 2003 10:08 pm

Post by towline_5 »

Yes, theoretically they have already created user names and passwords.
User avatar
twigletmac
Her Royal Site Adminness
Posts: 5371
Joined: Tue Apr 23, 2002 2:21 am
Location: Essex, UK

Post by twigletmac »

You need to have some way of linking the username information with the other data stored about them - e.g. having an auto-incrementing ID field in the users table which is used as a foreign key in the transactions table.

Mac
towline_5
Forum Newbie
Posts: 3
Joined: Thu Jul 17, 2003 10:08 pm

Post by towline_5 »

Thank you. I'll try that.
Post Reply