I had a heck of a time trying to connect to MSSQL from Linux. It can be done, but the only driver I've found that works properly with the latest versions of MSSQL is the Easysoft driver. Assuming you don't want to spend the $1,200 for that, it is best to connect via Windows, which has built-in MSSQL connectivity. Then it's a simple matter of ensuring that the MSSQL extension is installed and enabled (which it is by default in the XAMPP package).
After that, everything gets very easy and MySQL-like:
$conn = mssql_connect("servername", "username", "password");