I have a Mysql/ PHP application. I want to sell it SAS. I am thinking of a hosting company that has multiple databases available. I want a page were they login and I take them to their database. I will have many databases with identical structure. I need a way to switch them into that folder( I may modify some code for them like css) and operate their database. I could use a master table for the logins but how to connect to their database? I am concerned about security. Example: Lets say I have 3 customers. A B C I set up 3 folders on an apache server, copy code there, set unique database names like new_db_a, new_db_b, new_db_c. Now if I do it in a memory variable when a logs in it will take him to his spot. He can see the url and could easily substitute another letter and run another companies database.
I am willing to use Perl, PHP or whatever to do this. Whats the best way to do this?