mirror of
https://github.com/Microsoft/sql-server-samples.git
synced 2025-12-08 14:58:54 +00:00
Merge pull request #763 from ravage84/patch-1
Improve and modernize example
This commit is contained in:
@@ -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!";
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user