Created
August 31, 2012 16:23
-
-
Save pippinsplugins/3555363 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| /* | |
| Plugin Name: Newton Police PHP to Access | |
| Description: Inserts form data from the website into the access databases | |
| Author: Pippin Williamson | |
| Version: 1.0 | |
| */ | |
| function test_db() { | |
| if( isset( $_GET['db'] ) ) { | |
| $dbName = $_SERVER["DOCUMENT_ROOT"] . "products\\products.mdb"; | |
| echo $dbName; exit; | |
| if (!file_exists($dbName)) { | |
| die("Could not find database file."); | |
| } | |
| $db = new PDO("odbc:DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=$dbName; Uid=; Pwd=;"); | |
| } | |
| } | |
| add_action('init', 'test_db'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment