For Programmers: Free Programming Magazines  


Home > Archive > PHP on Windows > February 2007 > A measre of security









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author A measre of security
Gustav Wiberg

2007-02-14, 8:01 am

Hi!

This is a kind of security-question....

I'm starting up a system, where several customers should be able to login with there own information.
Each company I give unique identity with "hard-coding" and each company hasits own folder...


Harding-coding, something like:
$company -> setIDCompany(1);
$company -> setIDCompany(2);
$company -> setIDCompany(3);

Diffrent folders:
customers/company1
customers/company2
customers/company3

and so on...


This isn't complicated, but when I add a new company.... ...I must be 200% sure that the IDCompany is set correct (There is a chance of setting thewrong ID for a new company or forgetting to change it)
The companys ARE NOT ALLOWED to see each others information.

Is there any good way of solving this with some sort of comparision-mechanism or something like that? Any thoughts?

Best regards
/Gustav Wiberg
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com