Well, as long as you have some sort of header file that is included at the of each page (using the idea of one template for many looks, this is a given) then you can just parseurl() out the host portion and set it in each script. Or pass it around as a cookie or session data. This is how we use a single template for 30+ clients at my work. We actually have a function that is called automatically at the beginning of every page that automatically gets the host portion and keys everything off that. For the database side, I suppose you can have a separate DB for every "team" but you could also just as easily combine them into one big table (like data...meaning account info in one table, settings in another, etc.) and index the proper fields. Performance is good and you only have to manage a few tables in one DB instead of duplicate DB's or tables for each "team." Key them off the unique host and use that host for managing everything for that specific "team."