w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
How to connect from a linux server with php to a database that is in a windows server?

Where the database is doesn't matter for connecting. As long as you use the correct credentials and functions, it will connect.

If you see any connection method( PDO, mysqli etc ), it doesn't show the operating system anywhere. Database is running on top of the operating system.

check for errors in each step. Example:

$link = mysqli_connect("myhost","myuser","mypassw","mybd") or
die("Error " . mysqli_error($link));

See http://www.php.net/manual/en/function.mysqli-connect.php.

© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.