exec($sql); // You can add a success message here if running from CLI // echo "Table 'patients' created successfully (if it didn't exist)."; } catch (PDOException $e) { // In a real app, you'd log this error, not display it die("DB ERROR: " . $e->getMessage()); }