I am trying to access an MS sql server through PHP, I have verified that I am able to connect to the MS SQL server by connecting through an alternate source. Here is my code.
$sqlServer = 'SQL10.sqlsvr.net';
$sqlUser = 'CMSADMIN';
$sqlPass = 'password';
$db = 'attaincms';
$s = mssql_connect($sqlServer, $sqlUser, $sqlPass) or die("Couldn't connect to SQL Server on $sqlServer");
$d = mssql_select_db($db, $s) or die("Couldn't open database $db");
$query = "SELECT LastName FROM Account WHERE AccountId = 110";
$result = mssql_query($query);
$numRows = mssql_num_rows($result);
echo "<h1>" . $numRows . " Row" . ($numRows == 1 ? "" : "s") . " Returned </h1>";
while($row = mssql_fetch_array($result))
{
echo "<li>" . $row["LastName"] . "</li>";
}
The page loads and doesn't throw any die errors, and I don't get any other errors either. I have verified with the Server provider that the proper settings are in place for the php.ini file.
PEASE HELP ME!!!! :mad: :mad: :mad: