Skip to content

Instantly share code, notes, and snippets.

@mohanadkaleia
Created October 3, 2015 19:53
Show Gist options
  • Save mohanadkaleia/f1616d3ff7cecdf90fb9 to your computer and use it in GitHub Desktop.
Save mohanadkaleia/f1616d3ff7cecdf90fb9 to your computer and use it in GitHub Desktop.
<?php
$serverName = "MOHANA-LAPTOP\SQLEXPRESS";
$connectionInfo = array("Database" => "test", "UID" => "sa", "PWD"=>"123456");
$conn = sqlsrv_connect($serverName, $connectionInfo);
if($conn) {
echo "Connection established .. :)";
} else {
echo "Connection could not be established :(";
dir(print_r(sqlsrv_errors(), true));
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment