We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 518e637 + ce55733 commit c2e2065Copy full SHA for c2e2065
samples/tutorials/php/Ubuntu/SqlServerSample/connect.php
@@ -1,12 +1,14 @@
1
<?php
2
+ // Setup the connection
3
$serverName = "localhost";
- $connectionOptions = array(
4
+ $connectionOptions = [
5
"Database" => "SampleDB",
6
"Uid" => "sa",
7
"PWD" => "your_password"
- );
8
- //Establishes the connection
9
- $conn = sqlsrv_connect($serverName, $connectionOptions);
10
- if($conn)
11
- echo "Connected!"
12
-?>
+ ];
+
+ // Establish the connection
+ $connection = sqlsrv_connect($serverName, $connectionOptions);
+ if ($connection) {
13
+ echo "Connected!";
14
+ }
0 commit comments