Location: PHPKode > scripts > Register User > register-user/class_connect_db.php
<?php

require_once("config.php");
	class MySQL {
	
	
	public function connect($DB_HOST, $DB_USER, $DB_PASSWORD, $DB_NAME) {
	
		$connect = mysql_connect("$DB_HOST", "$DB_USER", "$DB_PASSWORD") or die
		("Nie mo¿na nawi±zaæ po³±czenia");
		
		$db = mysql_select_db("$DB_NAME") or die ("Nie mo¿na wybraæ bazy");
		
	}
}

$obj= new MySQL();
$obj->connect($DB_HOST, $DB_USER, $DB_PASSWORD, $DB_NAME);
?>
Return current item: Register User