Skip to content

Instantly share code, notes, and snippets.

@ganglio
Created May 22, 2012 10:57
Show Gist options
  • Save ganglio/2768325 to your computer and use it in GitHub Desktop.
Save ganglio/2768325 to your computer and use it in GitHub Desktop.
MySQL Connection
<?php
$host="HOSTNAME";
$username="USERNAME";
$password="PASSWORD";
$database="DATABASE";
if (!($db=mysql_connect($host,$username,$password)))
die("unable to connect:".mysql_error());
if (!mysql_select_db($database,$db))
die("unable to select database:".mysql_error());
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment