Location: PHPKode > projects > Slacker > slacker/slacker.inc/slacker/dbconnect.inc.php
<?
// void dbconnect ([string database name [, string user name [, string password [, string server name]]]])

// This function will connect to a MySQL database. If the attempt to connect
// fails, an error message prints out and the script will exit.

function dbconnect ($dbname="slacker",$user="slacker",$password="slacker",$server="localhost")
{
	if (!($mylink = mysql_connect($server,$user,$password)))
	{
		print "<h3>could not connect to database</h3>\n";
	}
	mysql_select_db($dbname);
}
?>
Return current item: Slacker