Skip to content

Instantly share code, notes, and snippets.

@jennimckinnon
Created May 22, 2016 08:50
Show Gist options
  • Save jennimckinnon/5f831b5d6460bbc514cbf00bc8230e67 to your computer and use it in GitHub Desktop.
Save jennimckinnon/5f831b5d6460bbc514cbf00bc8230e67 to your computer and use it in GitHub Desktop.
<?php
$link = mysql_connect('your_hostname', 'database_username', 'database_password');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment