This is a small script that should connect to a remote MSSQL database (a buddy of mine and I are trying this). I have worked on this for two evenings now...to no avail.
<?php
$hostname = "65.16.54.15";
$username = "User";
$password = "Pass";
$dbName = "DBName";
MSSQL_CONNECT($hostname,$username,$password) or DIE("DATABASE FAILED TO RESPOND.");
mssql_select_db($dbName) or DIE("Table unavailable");
$query = "SELECT * FROM Players";
$result = MSSQL_QUERY($query);
$number = MSSQL_NUM_ROWS($result);
$i=0;
if ($number == 0) :
print "No data?";
elseif ($number > 0) :
print "Data:";
while ($i < $number) :
$name = mssql_result($result,$i,"Name");
print $name;
print "";
$i++;
endwhile;
endif;
?>
This is the output I receive:
Fatal error: Call to undefined function: mssql_connect() in /www/url/test2.php on line 8
Thanks for any help you can offer.