Location: PHPKode > projects > YASeMI > yasemi_0.1/gs/dbc.php
<?php

// THIS SCRIPT CONNECTS TO THE DATABASE
function db_connect() {

	// CONNECT TO THE DATABASE
	$con = mysql_connect ("localhost" , "dbusername" , "dbpassword") 
	or die ('I cannot connect to the database because: ' . mysql_error());
	
	// SELECT THE DB WE ARE GOING TO USE
    $db_selected =  mysql_select_db ("netflow_db_name");
	if (!$db_selected) {
      die ('Can\'t use database : ' . mysql_error());
    }

	return $con;

}

?>
Return current item: YASeMI