Skip to content

Commit ce55733

Browse files
authored
Improve and modernize example
1 parent 46d7ea3 commit ce55733

File tree

1 file changed

+9
-7
lines changed
  • samples/tutorials/php/Ubuntu/SqlServerSample

1 file changed

+9
-7
lines changed
Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
<?php
2+
// Setup the connection
23
$serverName = "localhost";
3-
$connectionOptions = array(
4+
$connectionOptions = [
45
"Database" => "SampleDB",
56
"Uid" => "sa",
67
"PWD" => "your_password"
7-
);
8-
//Establishes the connection
9-
$conn = sqlsrv_connect($serverName, $connectionOptions);
10-
if($conn)
11-
echo "Connected!"
12-
?>
8+
];
9+
10+
// Establish the connection
11+
$connection = sqlsrv_connect($serverName, $connectionOptions);
12+
if ($connection) {
13+
echo "Connected!";
14+
}

0 commit comments

Comments
 (0)