Restrict items displayed in database
Posted on 2006-04-14
This should be a pretty straightforward Q, but I am not sure how to attack it. I have a standard login screen, which takes users through to information stored in a database. The database is global, and contains info for several customers.
I need to restrict access so that when a user logs on, only the information relating to their customer number is displayed in the database. Obviously I need a 3rd variable on the logon, and I have created username, password, and customer no fields. Should I match these to username password and access level in the dreamweaver login user wizard?
If so, how do I link access level to display the corresponding cust number on the db? Each cust might have 50-100 records, and I only want to display the cust numbers that match the cust number variable at logon.
I am guessing that the SQL would be something like SELECT * FROM mytable WHERE custno = 'access_level_variable'
Am I on the right track? What is the easiest way (using Dreamweaver) to achieve this?