How do you use 1 database for multiple php scripts? so i have a lot of different php scripts like user management, shopping cart, forums. I don't want my customers to have to sign-up multiple times for my website. I need to know how to do this._____________________easy healthy recipes ~ slow cooker recipes ~ meals recipes

Last edited by anasiya on Mon Mar 25, 2013 3:46 pm, edited 1 time in total.

personally I use a file Database.php that contains a Database class. it is called in by an autoloader function in my 'functions.php' that is loaded on every page. Whenever a page needs database access, it just calls the getInstance() static method and it's all set. Here's my database class