Skip to content

Instantly share code, notes, and snippets.

@shiftregister-vg
Last active August 29, 2015 14:11
Show Gist options
  • Save shiftregister-vg/683f387561dbcca3ce17 to your computer and use it in GitHub Desktop.
Save shiftregister-vg/683f387561dbcca3ce17 to your computer and use it in GitHub Desktop.
mysql php connection
<?php
$mysql_host = 'localhost';
$mysql_user = 'root';
$mysql_pass = '';
$mysql_db = 'accounts';
$conn = mysql_connect ($mysql_host, $mysql_user, $mysql_pass);
if (!$conn) {
die(mysql_error());
}
$sel_db = mysql_select_db($mysql_db);
if (!$sel_db) {
die(mysql_error());
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment