PHP/MySQL database connection snippet
<?php
//Usage: save this file as scr_connection.php and include it where needed.
//Define connection variables
$db_host = ' '; //Database server LOCATION
$db_name = ' '; //Database NAME
$db_username = ' '; //Database USERNAME
$db_password = ' '; //Database PASSWORD
//Connect to database
$connections = mysql_connect($db_host, $db_username, $db_password) or die ('Unable to connect to the database') ;
mysql_select_db($db_name) or die ('Unable to select database!') ;
?>
Emir Plicanic owns and operates a web design company, is a graphic designer at a nation wide company, and enjoys teaching Dreamweaver to enthusiastic students at a local college.