View Single Post
Owain Owain is offline
Registered
 
Owain's Avatar
 
Join Date: Jun 2003
Location: Vancouver BC
Posts: 215
Quote:
Originally Posted by rattlsnak View Post
They should be all static. OK, so basically you are saying that I can match a username/password to certain files/pages in the same table? Right now I just have two fields in one table, username and password. So it seems that if I make a different table for each user to include three fields, username, password and available pages allowed, that would work? Or basically keeping the same table I have now, and then adding another table that matches usernames to pages allowed? I dont understand how one big table could hold the info, as opposed to making several different tables, but then again, the main login page can only point to one database table, correct?

I also understand that this my be way over my head! It just seems there must be a simple way to do this.

And in saying that, i may have thought of another way, although not as pretty. Have a main login page for all of his clients, that would direct them to another secure login page that they could pick from a drop down menu or such. But that would be a last resort.

Thanks again for the replies, I know I heading down the right track.!
The easiest here would probably be to have two tables: one with userid and password, and the second with userid and AvailablePage. When a new page is made for a particular user you would just add a new row to the second table.

From your login page, after you authenticate the user send them to the 'logged in' page which does something like: "SELECT AvailablePage FROM tPages WHERE userid='WhereverYou'reKeepingTheLoggedInUserid'". Then loop through those rows to make a menu of available pages for that particular user.

That's what I'd do in php, anyway. I'm not sure about the Dreamweaver stuff.

Hope that helps a bit.
__________________
/Owain
'87 951
'84 944 -- Stolen!
Canada West Region - PCA
Old 05-20-2008, 01:01 PM
  Pelican Parts Catalog | Tech Articles | Promos & Specials    Reply With Quote #13 (permalink)