db.php without using PEAR
Posted: Fri Nov 21, 2008 11:50 pm
Hi!
I'm doing a project and we belatedly realized that the correct thing to do was to have a file called db.php, which made the connection to the database, that we require_once on every page. This way, if the connection string changes, only one file needs to be edited. Everything I've found on how to do this says, "Use PEAR! It's easy and does it for you!"
However, the project is due quite soon [i.e. in a few days] and I don't have the time to a) learn PEAR and b) implement that throughout the entire site (which will probably have to be restructured).
Does anyone know another way to do this or where I could look for more info? Thanks!
I'm doing a project and we belatedly realized that the correct thing to do was to have a file called db.php, which made the connection to the database, that we require_once on every page. This way, if the connection string changes, only one file needs to be edited. Everything I've found on how to do this says, "Use PEAR! It's easy and does it for you!"
However, the project is due quite soon [i.e. in a few days] and I don't have the time to a) learn PEAR and b) implement that throughout the entire site (which will probably have to be restructured).
Does anyone know another way to do this or where I could look for more info? Thanks!