Skip to content

Instantly share code, notes, and snippets.

@chicks
Last active December 12, 2015 05:59
Show Gist options
  • Save chicks/4726249 to your computer and use it in GitHub Desktop.
Save chicks/4726249 to your computer and use it in GitHub Desktop.
<?php
// Server in the this format: <computer>\<instance name> or
// <server>,<port> when using a non default port number
$server = 'localhost';
$user = 'sa';
$pass = 'password';
// Connect to MSSQL
$link = mssql_connect($server, $user, $pass);
if (!$link) {
die('Something went wrong while connecting to MSSQL');
}
echo('Connected!');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment