Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $server = 'xxx.xxx.xxx.xxx';
- $user = 'user.....';
- $pass = 'password...';
- $port='1433';
- $database = 'database...';
- $connection_string = "DRIVER={SQL Server};SERVER=$server;PORT=$port;DATABASE=$database";
- $conn = odbc_connect($connection_string,$user,$pass);
- if ($conn) {
- echo "Connection established.";
- } else{
- die("Connection could not be established.");
- }
Add Comment
Please, Sign In to add comment