Simple, effective, and affordable software.
PLEASE NOTE: Security policies are beyond the scope of this document. Please discuss security with your hosting provider or network administrator.


Connecting to DoyleSoft Knowledge Base Software via PHP and ODBC

ODBC is an Application Programming Interface (API) that allows you to connect to a data source (e.g. an MS Access database). With an ODBC connection, you can connect to any database, on any computer in your network, as long as an ODBC connection is available.

Here is how to create an ODBC connection to a MS Access Database:

1. Open odbcad32 by clicking Start | Run and typing odbcad32 in the Open line.
2. Choose the System DSN tab.
3. Click on Add in the System DSN tab.
4. Select the Microsoft Access Driver. Click Finish.
5. In the next screen, click Select to locate the database.
6. Give the database a Data Source Name (DSN).
7. Click OK.
Note that this configuration has to be done on the computer where your web site is located. If your web site is located on a remote server, you have to have access to that server, or ask your web host or network administrator to set up a DSN for you to use.

Open odbcad32

ODBC System DSN

Microsoft Access Driver

Setup DoyleSoft Knowledge Base Software

Now, setup your index.php file as displayed below:

<html>
<body>
<?php
$conn=odbc_connect('KB','','');
if (!$conn)
  {exit("Connection Failed: " . $conn);}
$sql="SELECT * FROM KB";
$rs=odbc_exec($conn,$sql);
if (!$rs)
  {exit("Error in SQL");}
echo "<table><tr>";
echo "<th>KBTitle</th>";
echo "<th>KBProblem</th></tr>";
while (odbc_fetch_row($rs))
{
  $KBTitle=odbc_result($rs,"Title");
  $KBProblem=odbc_result($rs,"Problem");
  echo "<tr><td>$KBTitle</td>";
  echo "<td>$KBProblem</td></tr>";
}
odbc_close($conn);
echo "</table>";
?>
</body>
</html>


That's it! Just place the index.php in your HTML Documents folder or a sub-folder named 'KB' for example on your web server/web site.
You will then be able to see your Knowledge Base articles from the Web!

Sign up for the free DoyleSoft Newsletter!

Get fresh DoyleSoft content sent straight to your email inbox. You will receive special offers from DoyleSoft not offered anywhere else. You can only get the special offers if you are a newsletter subscriber. Sign up today!

Your email address will be kept confidential, and will only be used to send you our free newsletter.

Email: