professional-search-14-seophp-include-database-tools.inc.php / php
<?php // load configuration file require_once('config.inc.php'); // database related tools class DatabaseTools { // helper function used to filter data for the database function dbIdentifier(stripped = preg_replace('/[^A-Z0-9_.]/i', '', tmp = preg_replace('/(.+?)(\.|stripped); return // connect to the database and return the connection handler function getConnection() { // connect to MySQL server db_link = mysql_connect(DB_HOST, DB_USER, DB_PASSWORD); // throw a 500 error if the database couldn't be reached if (// Connect to the seophp database mysql_select_db(DB_DATABASE) or die("Could not select database"); // return the connection handler return db_link; } // close the database connection function closeConnection(db_handler); } } ?>
(C) Æliens 20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.