Skip to main content
Participant
August 19, 2008
Question

Help with "My Account Page"

  • August 19, 2008
  • 1 reply
  • 194 views
Hello, I have been trying to build a basic "my account" page on my website. I am using Dreamweaver, PHP, and MySQL. I have already built a logon page that allows users to logon by checking their name and password.

I am trying to do this: after a user logs on, they are taken to a "my account" page that should display only their specific information. The database has one table and it contains: userid (primary key), first name, last name, password, and color. I created a recordset and a dynamic table on the account page. However, after a user logs on, they can see all of the information in the database table.

How can I filter the recordset so that the user only sees the information associated with their specific userid?

Example (output in dynamic table after Joe001 logs on and goes to account page):

Joe001 - Joe - Smith - Red
Susan001 - Susan - Johnson - Blue

When Joe001 logs on, he should only see his information, not Susan's.

I have tried to use form variables and session variables but have not been successful (I've been working on this for several days!). Does anyone have a tip? Thanks!!!
This topic has been closed for replies.

1 reply

Participant
August 22, 2008
I got it to work. When a user logs on, I've setup a filter in the MySQL PHP connection so that only their data shows up in the table. However, the user's userID is displayed in the URL.

How can I remove the session ID (username) from the URL? This of course is a security issue as you can simply change the userID in the URL to see another user's information.

Does anyone have a tip or an answer? Thanks!!