michaelp0730
1/19/2015 - 6:40 PM

MySQL Database Connection (PHP)

<?php
$server = "SERVER-ADDRESS";
$user = "USERNAME";
$pass = "PASSWORD";
$db = "DATABASE_NAME";
$connection = mysql_connect($server, $user, $pass)
or die ("Could not connect to server ... \n" . mysql_error ());
mysql_select_db($db)
or die ("Could not connect to database ... \n" . mysql_error ());
?>