0
<?php
// Set up the database connection
$dsn = 'mysql:host=localhost;dbname=lafamosa_plaincart;
$username = 'lafamosa_kermis';
$password = 'lafamosa1980';
$options = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION);

try {
    $db = new PDO($dsn, $username, $password, $options);
} catch (PDOException $e) {
    $error_message = $e->getMessage();
    include('errors/db_error_connect.php');
    exit();
}
?>

Parse error: syntax error, unexpected T_STRING in /home/lafamosa/public_html/dene/model/database.php on line 4

2
Contributors
1
Reply
2
Views
5 Years
Discussion Span
Last Post by phorce
1

Try this:

<?php
// Set up the database connection
$dsn = 'mysql:host=localhost;dbname=lafamosa_plaincart';
$username = 'lafamosa_kermis';
$password = 'lafamosa1980';
$options = array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION);

try {
    $db = new PDO($dsn, $username, $password, $options);
} catch (PDOException $e) {
    $error_message = $e->getMessage();
    include('errors/db_error_connect.php');
    exit();
}
?>
This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.