Data is loaded into div #container. “itens.php” is used for any access, but each client has own database. When “itens.php” is running it already have connection to the correct client database. I don’t know the best way to use data.php (unique file, not one for each client) connect to client database.
The only manner I see is posting string with the database name, but don’t sounds good.
How good way to make that?
Itens.php:
$(...).click(funtction(){
(...)
$("#container").load('data.php?id=' + id);
(...)
});
How about use a additional database to store the mapping of username to database name?
So you only need to post the username.