How to make single project connect to different databases passing database name via URL? |
6/11/2014 5:55:25 PM |
PHPRunner Tips and Tricks | |
admin
Q: I have created a script that works, but it is assigned to just one database. I have a number of identical databases on same server, and would like to assign each one when they login. Is there a way to do that? table names are all the same.
http://mywebsite.com/login.php?dbname=database_name_here |
|
A
|
asawyer13DevClub member 1/8/2016 |
Seems like it would be better to do something like have a table in a system wide database to login, and then in the user table specify the database to use. Not sure I could code it in PHPR but I would think that would be a better solution than providing it on the URL, though the URL option would work. |
A
|
afa1999 1/9/2019 |
Q: I have created a script that works, but it is assigned to just one database. I have a number of identical databases on same server, and would like to assign each one when they login. Is there a way to do that? table names are all the same. A: Here is an example of how this can be done
http://mywebsite.com/login.php?dbname=database_name_here
|