<?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


// Establishes the connection
$conn = mysqli_init();

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

if (!mysqli_real_connect($conn, $serverName, $username, $password, $databaseName)) {
    die("Connect Error: " . mysqli_connect_error());
}

// SQL query to get all table names
$query = "SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'";

$result = mysqli_query($conn, $query);

if (!$result) {
    die("Query failed: " . mysqli_error($conn));
}

// Fetch data from the result set
while ($row = mysqli_fetch_assoc($result)) {
    echo $row['TABLE_NAME'] . "<br>";
}

// Close the connection
mysqli_close($conn);

?>