<?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

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();
}
?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.