Return to Snippet

Revision: 50265
at August 17, 2011 19:06 by elvman


Initial Code
define('HOST', 'localhost');
define('USER', 'root');
define('PASS', 'root');
define('DATABASE', 'analytics');
define('ENCODING', 'utf8');

$database = mysql_connect(HOST, USER, PASS) or die(mysql_error());
mysql_select_db(DATABASE, $database) or die(mysql_error());

mysql_query('SET NAMES '.ENCODING, $database) or die(mysql_error());

Initial URL

                                

Initial Description

                                

Initial Title
Connect to MySQL database

Initial Tags

                                

Initial Language
PHP