Quote:
|
Originally Posted by mulatod
Hi people
I have a problem.
I have some scripts, and I am trying to implement an UNIQUE LOGIN for all scripts.
NOW I have found a solution for this.
I merge all scripts databases into ONLY ONE... NO SHARED database.
and a main script use for members to register.
When members register to script A, this script copy the user data to the other scripts tables.
My problem?
I think that perhaps it would be better if all databases are independient. and the script send the data to the others databases tables, not to the same DB.
Any solution?
Mulato
|
I would create your user table as such:
UserID - primary key
userlogin - login name
password - store encrypted either with MD5 or base64_encode
database1 - y/n field to determine if they have access or not
database2 - y/n field to determine if they have access or not
Then when a user logs in you can query to see what databases they have access to and grant them access as needed. You can include all of this in one database as well. Instead of databases replace it with tables.