What are some potential pitfalls when upgrading from PHP 5.6 to PHP 7.3, specifically in terms of database connectivity and constant definitions?

When upgrading from PHP 5.6 to PHP 7.3, some potential pitfalls in terms of database connectivity include deprecated functions like `mysql_connect()` and changes in error handling. To solve this, update your database connection code to use `mysqli_connect()` or PDO for improved security and compatibility with PHP 7.3. For constant definitions, be aware that PHP 7.3 introduced stricter constant visibility rules, so ensure that constants are defined with the correct visibility (public, protected, or private) to avoid errors. Database Connectivity Fix:

// PHP 5.6 database connection
$conn = mysqli_connect('localhost', 'username', 'password', 'database');

// PHP 7.3 database connection
$conn = new mysqli('localhost', 'username', 'password', 'database');
```

Constant Definitions Fix:
```php
// PHP 5.6 constant definition
define('MY_CONSTANT', 'value');

// PHP 7.3 constant definition with correct visibility
const MY_CONSTANT = 'value';