select destination folders based on login
Posted on 2011-03-24
I use a simple 1 page cms-system for simple sites. what i want to do is "load" different destination folders based on the username that is used to login. (no databases used)
> i can add the username / password combinations in the settings file, along with the correct folders
so the username and the folder-settings are in the settings file that is included:
define ("USERN", "admin"); //Site username
define ("PASSW", 'test'); //Site password
$IMAGEDIR = 'uploaded/admin/images/'; // for images
and so on.
so if username "admin2" is used to log in it should look like this:
define ("USERN", "admin2"); //Site username
define ("PASSW", 'test2'); //Site password
$IMAGEDIR = 'uploaded/admin2/images/'; // for admin2's images
how can i do this?