My corporate site uses PHP and MS SQL on IIS. After specifying the DSN user/pass for SQL Server in my Server's ODBC setting, I use the following to connect.
$cs = odbc_connect("dsn_name", "user_name", "password");
My SQL7 server is on a different box than the server. I know mine is not Free BSD, but you will have to specify a DSN setting on your Free BSD box to look for a database connection (if you haven't already). I'm no guru on networking, but I hope something here helps you.
Sincerely.