Location: PHPKode > projects > Slacker > slacker/slacker.inc/slacker/dbconnect_shell.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="1username1",$user="1username1",$password="1password1",$server="localhost")
{
	if (!($mylink = mysql_connect($server,$user,$password)))
	{
		print "<h3>could not connect to database</h3>\n";
		exit;
	}
	mysql_select_db($dbname);
}
?>
Return current item: Slacker