Connecting to Access Database with PHP
From Hostek.com Wiki
Revision as of 17:21, 23 May 2013 by Maxm (Talk | contribs) (Created page with "==How to Connect to an Access Database with PHP== Note: This only works on our Windows servers. #Create a DSN in WCP #Use the following code example: <pre> <?php $DSN="myODBC...")
How to Connect to an Access Database with PHP
Note: This only works on our Windows servers.
- Create a DSN in WCP
- Use the following code example:
<?php $DSN="myODBC_DSN"; $DSN_User=""; $DSN_Passwd=""; $QueryString="SELECT id, FirstName, LastName, Email FROM tblContact"; $Connect = odbc_connect( $DSN, $DSN_User, $DSN_Passwd ); $Result = odbc_exec( $Connect, $QueryString ); ?>