Files
sql-server-samples/samples/tutorials/AzureSqlGettingStartedSamples/php/Windows/AzureSqlSample/connect.php
T
akatesmith 50468c14d3 adding azure sql samples
Adding the samples content from extending the getting started website for azure specific workflows
2020-09-15 12:20:56 -07:00

12 lines
337 B
PHP

<?php
$serverName = "your_server.database.windows.net";
$connectionOptions = array(
"Database" => "your_database",
"Uid" => "your_user",
"PWD" => "your_password"
);
//Establishes the connection
$conn = sqlsrv_connect($serverName, $connectionOptions);
if($conn)
echo "Connected!"
?>