Skip to content

Commit

Permalink
test php
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshiMinh committed May 28, 2024
1 parent abf45f7 commit c452f21
Show file tree
Hide file tree
Showing 6 changed files with 33 additions and 0 deletions.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions TestSpace/movieinfopage/desktop.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[.ShellClassInfo]
IconResource=C:\Program Files\Google\Drive File Stream\91.0.2.0\GoogleDriveFS.exe,25
File renamed without changes.
File renamed without changes.
31 changes: 31 additions & 0 deletions TestSpace/phpconnect.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!DOCTYPE html>
<html>
<head>
<title>SQL Server Connection</title>
</head>
<body>
<?php
// Connection info
$serverName = "JoshiNitro5"; // Replace with the actual IP address or server name
$instanceName = "MSSQLSERVER02";
$databaseName = "CinemaData";
$username = "AdminCinema";
$password = "Admin"; // Replace with the actual password

// Create connection string
$connectionString = "sqlsrv:Server=$serverName\\$instanceName;Database=$databaseName";

try {
// Create connection
$conn = new PDO($connectionString, $username, $password);

// Set the PDO error mode to exception
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);

echo "<h1>Connection Successful</h1>";
} catch (PDOException $e) {
echo "<h1>Connection Failed: " . $e->getMessage() . "</h1>";
}
?>
</body>
</html>

0 comments on commit c452f21

Please sign in to comment.