simy202 DD-WRT Novice
Joined: 07 Jan 2011 Posts: 1
|
Posted: Fri Jan 07, 2011 6:26 Post subject: PHP User Management with custom directories question |
|
It's for an image editor, and so each user should have their own "space" i.e. user directory (USERDIR) upon signing up, and anything under that directory should be accessible to the relevant user only. Yet another PHP User Management question. Fairly simple step up but I can't seem to find the right keywords to search for a tutorial.
The way I was thinking of implementing it is having a "USERDIR" column in the MySQL db along side "USERID" and "PASSWORD" (md5 hashed) (although I understand USERDIR is a redundant key if USERIDs are also unique - is this an issue to be worried about? i.e. I could just assign the USERID as the directory name instead of generating a unique random directory name). How do I then "check" whether the user has the privileges to access their directory (i.e. how do I code it to check the sessionID/cookie checking to stop another user from going to mysite.com/USERID or mysite.com/USERDIR). I appreciate this is really basic and repetitive for some of you but I can't seem to find the relevant tutorials anywhere! Any help much appreciated. |
|