Skip to content

Instantly share code, notes, and snippets.

@Usse
Created May 20, 2013 12:46
Show Gist options
  • Save Usse/5612001 to your computer and use it in GitHub Desktop.
Save Usse/5612001 to your computer and use it in GitHub Desktop.
Fast and dirty PHP db connect
<?php
$mysql_hostname = "hostname";
$mysql_user = "username";
$mysql_password = "password";
$mysql_database = "database";
$bd = mysql_connect($mysql_hostname, $mysql_user, $mysql_password)
or die("Connection error");
mysql_select_db($mysql_database, $bd) or die("DB selection error");
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment