I have a php file with the proper information, and I cannot figure out why I cannot make an ODBC connection to my SQL Database?
I have two files and am trying to create a simple webpage that is connected to my database.
First File (odbc_vertices.php):
<?php
//creates an odbc connection and stores it in $odbc variable
$odbc = odbc_connect ('VERTICES', 'correctusername','correctpassword') or die ( "Could Not Connect to ODBC Database!" );
?>
Second File (phptest.php):
<html>
<head>
<title></title>
</head>
<body>
<?php
include 'odbc_vertices.php';
?>
<select name='vndr'>
<option selected>
<?php
$query =odbc_exec($odbc_vertices,"SELECT * FROM tblOrder where Receive=No Order BY TapeType") or die (odbc_errormsg());
while ($row=odbc_fetch_array($query))
{
echo "<option value='".$row['VendorName']."'>".strtoupper($row ['VendorName'])."</option>";
}
?>
</select>
<INPUT TYPE=HIDDEN NAME='nam' SIZE='2'>
<?php
odbc_close($odbc_vertices);
?>
</body>
</html>
However I'm receiving this error when I go to test the page:
Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC SQL Server Driver][SQL Server]Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'., SQL state 28000 in SQLConnect in odbc_vertices.php on line 4 Could Not Connect to ODBC Database!
I'm trying to figure out what should be changed in the odbc_vertices.php file for the connection to be successful. Any help would be appreciated