<?php

	//connect to pursuit licensing database
			try {
				$hostname = "51.89.165.204:1433";
				$dbname = "PursuitLicensing";
				$username = "vdsuser";
				$pw = "vdsuser";
				$conn = new PDO ("dblib:host=$hostname;dbname=$dbname","$username","$pw");
			} catch (PDOException $e) {
				echo "Failed to get config connection: " . $e->getMessage() . "\n";
				exit;
			}

			//get id from url
			$optician_id = "1505";

			//query database
			$result = $conn->prepare("SELECT * FROM OpticianDetails WHERE OpticianId = $optician_id;");
			$result->execute();

			//get information from database and use to connect to diary web service
			$row = $result->fetch(PDO::FETCH_LAZY);

?>