exec($sql); // You can add more table creations here in the future } catch (PDOException $e) { // In a real app, you'd want to log this error // For this example, we'll just output it. die("DB setup failed: " . $e->getMessage()); } } // Run the setup setup_database();