I'm having a problem in connecting my access database using php. The wampserver displays a message of Parse error. I have connected my access db through control pannel's option administrative tools,but no output.plz help me....
The server shows the following message:
Warning: odbc_connect() [function.odbc-connect]: SQL error: [Microsoft][ODBC Microsoft Access Driver] Cannot open database '(unknown)'. It may not be a database that your application recognizes, or the file may be corrupt., SQL state S1000 in SQLConnect in E:\wamp\www\New Folder\my.php on line 5
Connection Failed:


if (!$conn)
  {exit("Connection Failed: " . $conn);}
$access="SELECT * FROM Student";
if (!$rs)
  {exit("Error in access");}
echo "<table><tr>";
echo "<th>StudentName</th>";
echo "<th>Contactname</th></tr>";
while (odbc_fetch_row($rs))
  echo "<tr><td>$compname</td>";
  echo "<td>$conname</td></tr>";
echo "</table>";


Double check your set up in the control panel to make sure everything is correct with MS Access driver and DSN for the database. You will have nothing but issues if something is not set up correctly.

Here are some steps to take: http://www.w3schools.com/PHP/php_db_odbc.asp