When you want a variable to be accessible by the entire script, but whose value will change use a global.
When you want to have a string representation of a value that does not change use a define.
Another rule of thumb, globals are usually within a single script while constants usually apply to an entire site (or at least an entire section of a site)
Example 1: No script on the site ever needs to change the database connection information, but every (or nearly every) script needs to access this information. So we have three values that many scripts use and no script changes so they should be constants.
Example 2: The login status of the current user. Every (or nearly every) script on the site needs this information. However some of the scripts, namely the log in and log out scripts, need to change this information as well. So this should be a global.