0

Dear,

I have two database connection files. It is possible to use them to connect with two database instead of one only? this code shown below is the coding of one of them to connect with the particular database. The other file is used for username and password of the database.

to be onest with you the two databases use the same username and password and only me login in db because it is my portfolio.

<?php
require("dbconn.php");
//create a new instance of the db connection
$db = new dbconn();
//set the database name for the application
$db->setdbname("blabla_blabla");
?>

Thanks.
Mario

2
Contributors
1
Reply
10
Views
3 Years
Discussion Span
Last Post by pritaeas
0

Yes, it's possible like you described. Solution depends on how you want to use it. If you want a more detailed answer, share both your files (remove your credentials) and give an example of what you want to achieve.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.