I'm having a real problem figuring out how to connect to a MSSQL database using an ODBC connection in PHP.
I checked my linux box and found a "odbc.ini" file in the etc folder. Does that mean I have what is needed to start making a connection to the database? How do I know? Is there a way to test ODBC connections to see if I have everything install?
If so, what is a simple connection string in PHP that allows me to see if I can touch the db?
I searched online and found this:
<?php
$connection = odbc_connect("DB","user","password");
if (!$connection) {
echo "Couldn't make a connection!";
exit;
}
?>[/COLOR][/SIZE]
Is this a correct statement for connecting? I get the connection error anyway.
Or maybe a simple tutorial with easy step by step instructions that explain how to install what's needed, and establishing a simple connection?
thanks!