Update and rewrite the full code. Ensure that all currency settings are updated when the user is logged in. The basis is in the 'users' table in the currency_id field. Then, compare it to the 'currency' table in the 'id' field.
Then, display the code of the currency. If the user is not logged in or they dont have the code of the currency, then use the USD as the default currency.
Make sure to format the number into a number format depending on the country/currency.