Improve and modernize example

This commit is contained in:
Marc Würth
2020-04-02 18:52:54 +02:00
committed by GitHub
parent 46d7ea3345
commit ce55733c3a
@@ -1,12 +1,14 @@
<?php
// Setup the connection
$serverName = "localhost";
$connectionOptions = array(
$connectionOptions = [
"Database" => "SampleDB",
"Uid" => "sa",
"PWD" => "your_password"
);
//Establishes the connection
$conn = sqlsrv_connect($serverName, $connectionOptions);
if($conn)
echo "Connected!"
?>
];
// Establish the connection
$connection = sqlsrv_connect($serverName, $connectionOptions);
if ($connection) {
echo "Connected!";
}