Location: PHPKode > projects > PhpAddEdit Form Generator > includes/dbconnect.inc.php
<?
/*
 ****************************************************************************
 * phpAddEdit Form Generator - http://www.phpaddedit.com
 * Copyright © 2007-2008 Jeff M. Blum
 *
 * Licensed under the terms of the following license:
 *  - GNU Lesser General Public License Version 3 or later (the "LGPL")
 *    http://www.gnu.org/licenses/lgpl.html
 *
 * == BEGIN LICENSE ==
 *
 * This file is part of phpAddEdit.
 *
 * phpAddEdit is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published 
 * by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * phpAddEdit is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with phpAddEdit.  If not, see <http://www.gnu.org/licenses/>.
 *
 * == END LICENSE ==
 *
 ****************************************************************************
*/

// --- JB - added 8-23-09 to prevent some include errors (e.g., when using XAMPP) but haven't fully tested if it causes any issues.
include_once(realpath(dirname(__FILE__))."/db.php");

if (DB_NAME!="x") {
	$db = new aedb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);

	$dbcharset = DB_CHARSET;
	$db->query("SET NAMES '$dbcharset'");
}
?>
Return current item: PhpAddEdit Form Generator