<?php
	try {
		$port = 1433;
		$host="192.168.10.51";
		$user="god";
		$pass="813019ssD#";
		$conn = new PDO ("sqlsrv:Server=$host","$user","$pass");
	} catch (PDOException $e) {
		echo "Failed to get DB handle: " . $e->getMessage() . "\n";
		exit;
	}

	try {
		$port = 1433;
		$host="192.168.10.61";
		$user="zack";
		$pass="zack123456";
		$conn_z = new PDO ("sqlsrv:Server=$host","$user","$pass");
	} catch (PDOException $e) {
		echo "Failed to get DB handle: " . $e->getMessage() . "\n";
		exit;
	}

	//database_connection.php
	//ติดต่อฐานข้อมูล MySQL
	// $host = "mysql:dbname=master;host=192.168.10.61";
	// $username = "zack";
	// $password = "zack123456";
	// $db_name = "master";
	// // $conn = "master";
	// try {
	// 	$$conn = new PDO ($host, $username, $password);
	// 	} catch (PDOException $e) {
	// 		echo "Failed to get DB handle: " . $e->getMessage() . "\n";
	// 		exit;
	// 	}

	// $host_name = "192.168.10.61";
	// $database = "EHONGDB"; // Change your database name
	// $username = "zack";          // Your database user id
	// $password = "zack123456";          // Your password
	//
	// //////// Do not Edit below /////////
	// try {
	// $dbo = new PDO('mysql:host='.$host_name.';dbname='.$database, $username, $password);
	// } catch (PDOException $e) {
	// print "Error!: " . $e->getMessage() . "<br/>";
	// die();
	// }

	// echo 'https://moodle2.ezmember.org/_rc_newpagex/_insert/_connect.php';
?>
