Tag Archives: database

PHP Database Connect Class

Save the following code as something like db_connect.php

Replace the host, username, and password with your own, and then replace DATABASE NAME with the database you will be working with.

Include it in any file working with database connections:  include("db_connect.php");

After this file is included you may do all of your database work between these two calls:

Database manipulation here…