Jump to content

Linking recordset in dreamweaver


RokitRod
 Share

Recommended Posts

I have a login page and after the user logs in it displays their info (by using the session username) to filter the database. I would like to display additional information from another table based on that isers information (but not their username) For example the user has an associated "region" field in their user information, many people have that same region idI would like to display the region details based on the users region ID How do I filter the recordset?

Link to comment
Share on other sites

The session data doesn't get sent to the user in a cookie, only the session ID does. They would need to know someone else's random session ID in order to impersonate another logged-in user. If you're already storing the username in the session then the first suggestion was just to store everything else in the session also, whatever other data you want to access about the user. You would do that the same way you're storing the username, just with the other data. The second suggestion would use a SQL query to look up the user's record in the database and get the other information on-demand. How you would do that depends on which database system you're using and how you connect to it, but you would sent a SELECT query to the database to look up the user and get their data.

Link to comment
Share on other sites

Thanks this is helpful I never realized that about the the session id. Unfortunatlye the username, password and group are established by the log in user behavior in dreamweaver so that is all done through a nice screen where I don't write any script. Therefore I'm not sure where that happens exactly. I'm guessing I could plug a few lines into that to pull in the other data. On the sceond option dreamweaver also makes the sql very easy (if it is a simple request) but writing a query to establish the recordset is more complex than my current knowledge.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...