New to PHP |
10/24/2007 2:05:22 PM |
PHPRunner General questions | |
R
robbhelt author
I really like this program and I have figured alot of it out on my own, but I am stumped on a few issues.
|
|
![]() |
hax0r 10/24/2007 |
Instead of multiple tables with different log ins, maybe you should consider one of the following options: |
R
|
robbhelt author 10/24/2007 |
The fact that only 10% of what you said made sense to me shows you exactly how dumb I am.. Instead of multiple tables with different log ins, maybe you should consider one of the following options: Create a table called Users. id - int(11) unsigned username - varchar(25) password - varchar(50) Now in your other table, add a column name user_id or whatever Whenever a user creates a record, insert their id into user_id. Furthermore, whenever people log in, restrict what they can see in your other table to rows that they created. WHERE id = user_id. That solution would let everyone see their own records, but no others. Perhaps you want some people to see all records, or some people to see certain people's records. In this case, you could set up a group_id in the Users table... so the Users table looks like Users id - int(11) unsigned group_id - int(11) unsigned username - varchar(25) password - varchar(50) Add the group_id to your other table. And allow people who log in to see their own entries as well as entries put up by other users in the same group. You could even reserve group_id 1 as a master group id (for yourself) and add to the Where clause "OR group_id = 1". This way you could see all entries... An even better alternative would be to also add a User_Grants table User_Grants user_id - int(11) unsigned <-- linked to Users table group_id - int(11) unsigned This way you could customize the entries that each user could see. good luck. don't forget to hash the password with md5 or sha1 or something similar. |
![]() |
Sergey Kornilov admin 10/24/2007 |
Robb, |
R
|
robbhelt author 10/24/2007 |
Yeah...Those are great...They show something that the program can do but now HOW to do it. |
![]() |
Sergey Kornilov admin 10/24/2007 |
Actually Flash tutorials show you HOW you can do things. |
G
|
GeddyLee 10/29/2007 |
Robb, |