Welcome to WiseSoft.co.uk!
Register
About
Contact
Donate
Home
Scripts
Articles
Software
Forum
Links
Active Directory Schema Guide
Submit a Script
All Scripts
Active Directory
Computer
Database
Event Logs
Exchange/Email
File System
General
Printer
SQL Server
Account Page
Address Page
COMPlus Page
DialIn Page
Environment Page
General Page
MemberOf Page
Organization Page
Profile Page
RemoteControl Page
Sessions Page
Telephones Page
TerminalServices Page
Batch File
HTA
KiXtart
PowerShell
T-SQL
VB
VBScript
Computer Accounts
Domains, Forests & Trusts
Groups
Monitoring & Replication
Organizational Units
Schema Information
Search
Sites and Subnets
User Accounts
PowerShell
VBScript
VBScript
PowerShell
VBScript
VBScript
VBScript
VBScript
VBScript
PowerShell
VBScript
VBScript
PowerShell
VBScript
HTA
KiXtart
PowerShell
VB
VBScript
VBScript
KiXtart
PowerShell
VBScript
PowerShell
VBScript
Batch File
KiXtart
PowerShell
VBScript
HTA
VB
VBScript
HTA
KiXtart
PowerShell
VBScript
HTA
PowerShell
T-SQL
VBScript
All Articles
Active Directory
Miscellaneous
Programming
Scripting
Security
SQL Server
WiseSoft
Submit Article
All Software
TSQL DDL Code History Tool
Account Management Spreadsheet
Bulk AD Users
Password Control
Script Builder
NTFSFix
TSQL DDL Code History Tool
Bulk AD Users
Password Control
Script Builder
Account Management Spreadsheet
NTFSFix
Scripting
Guestbook
Bugs
Suggestions
General
Bugs
Suggestions
General
Bugs
Suggestions
General
Bugs
Suggestions
General
Bugs
Suggestions
General
Bugs
Suggestions
General
Login
User Name:
Password:
Remember me next time
Forgot Password?
Login using OpenID:
Create free account
Exclusive access for registered users
Registered Users:
20870
Click here to find out how you can help support wisesoft.co.uk!
home
recent topics
recent posts
search
faq
AspNetForum v.5.2.7.0
WiseSoft :: Forum
:: Forum
user:
psw:
remember me
|
lost password
|
register
Home
»
Scripting
»
PHP User Management with custom directories questi
|
1/11/2011 10:53:30 PM
permalink
simy202
Posts 1
Yet another PHP/MySQL user management 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. 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.
--
PHP User Management
1/31/2011 11:50:24 AM
permalink
admin
Posts 331
Hi,
There are a number of different ways you can do this. I'm not an expert in PHP programming, so for the best advice I would recommend asking you question on a dedicated PHP or web programming forum. I did a quick google search and I came up with these two:
http://www.devnetwork.net/
http://www.phpfreaks.com/forums/index.php
If your developing a website you have a lot of control over how you implement security. Many sites will use an authentication mechanism similar to what you described. Hashing passwords is a good idea, but you should also include a salt value that is different for each user. I know .NET has some built-in features you can use so your not re-inventing the wheel, but I'm not that familiar with PHP so I'm unable to offer any specific advice.
Hope this helps,
David
PS
It would be best to use an autonumber/identity as your tables primary key and create a unique index on the username column. This will give you a smaller primary key that will never need to be updated.
pages:
1
|
Home
»
Scripting
»
PHP User Management with custom directories questi