Basic php to mySQl connection
//basic PhP to mySQL connection
//php bible p.74 quick connection that closes.
$host = “localhost”;
$user = “”;
$pass = “”;
$link = mysql_connection($host, $user, $pass); // or use ‘mysql_pconnection’ for a persistant connection.
mysql_close($link) //closes the connection to DB
mysql_select_db(“db_name”, $link);
?>
//php bible p.74 quick connection that closes.
$host = “localhost”;
$user = “”;
$pass = “”;
$link = mysql_connection($host, $user, $pass); // or use ‘mysql_pconnection’ for a persistant connection.
mysql_close($link) //closes the connection to DB
mysql_select_db(“db_name”, $link);
?>