Editor
Editor
Hi Allen. i thought you would like to know that the Generator application on the editor site is spitting out db.php files without the enclosing <?php and ?> characters. Also I don't know if it is intentional but the array sql_details is not declared users have to create that themselves.
This discussion has been closed.
Replies
[code]
<?php
/*
* DB connection script for Editor
* Automatically generated by http://editor.datatables.net/generator
*/
error_reporting(E_ALL);
ini_set('display_errors', '1');
/*
* Edit the following with your database connection options
*/
$sql_details = array(
"user" => "",
"pass" => "",
"host" => "",
"db" => ""
);
// PDO connection
$db = new PDO(
"mysql:host={$sql_details['host']};dbname={$sql_details['db']}",
$sql_details['user'],
$sql_details['pass'],
array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION
)
);
include( "include/DTEditor.mysql.pdo.class.php" );
[/code]
which is what I would expect. No closing tag, but the include file doesn't need one.
I'm not sure what would be causing a difference between what you are seeing and what I am. What browser / platform / details are you using for the form?
Allan
Using windows 7 with the latest version of Chrome.