<?php

$serverName = "51.89.165.204"; // Replace with your MSSQL server name or IP address
$databaseName = "PursuitLicensing"; // Replace with your database name
$username = "vdsuser"; // Replace with your username
$password = "vdsuser"; // Replace with your password


try{
 $conn = new PDO ("sqlsrv:Server=$servername;Database=$databasename;TrustServerCertificate=yes","$username","$pw");
            } catch (PDOException $e) {
               echo "Problem - error: " . $e->getMessage() . "\n";
				exit;
}
 //query database
			   $result = $conn->prepare("SELECT * FROM OpticianDetails WHERE OpticianId = $optician_id;");
			   $result->execute();

if (!$conn) {
    die("it failed");
}


?>