I have setup a site with a login that works fine.
What I need to do is have the primary user log in
-Then he would invite about 20 max people to join with the same username that he setup. They would have full access to his database.


What is the best way to set this up?
I was thinking of allowing each new member to enter their password with the same username, and at login to check all passwords to match in order to continue.

thanks in advance

Perhaps a login table like the following:

Username [B]|[/B] password | use_admin
cwarn23  | abcdefg9 | 1

The above structure has the username then the normal login password. After that is the value for logging into the admin account. So each user with the value 1 in use_admin can log into the admin account while users with the value 0 can't (btw use_admin would be an int/number field). Hope that helps.

thanks for the reply

Here is what I was thinking .
This is the setup. Members would be in groups were within the group all would share username but different password.

The person that signs up will supply all the info including the username for the group.
the other users would get an email invite with the username to register and then they would supply their password.

I was thinking assigning an identity for all the users each user's password would go in his table. When someone logs on with the username it would check all the passwords for a match.

username | pass_ident1 | pass_iden2 | pass_iden3 |.......

what do you think is this going to work?

username | pass_ident1 | pass_iden2 | pass_iden3 |.......

what do you think is this going to work?

If you want to have that sort of result then I would suggest having one password field and separating passwords with a character that cannot be used in each password. Then if say the character was * and you wanted to find a password matching that in the password field in then you would use the following (for possible passwords in password column and is searching in the second password field)

SELECT `user` FROM `users`
WHERE `password` LIKE "%*password*%*%"

That is how I would do it. And to search in the first password field instead of the second.

SELECT `user` FROM `users`
WHERE `password` LIKE "password*%*%*%"

The php version of the above mysql query

$v=mysql_real_escape_string('*');
mysql_query('SELECT `user` FROM `users` WHERE `password`'.
.' LIKE "'.mysql_real_escape_string('password').$v.'%'.$v.'%'.$v.'%"');
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.