the following is the error message,

Undefined index: gld in F:\xampp\htdocs\lfs\site_globalfn.php on line 14

then look at or before line 14 in the file, that only you can see, because you failed that small step that says "Show the people I want to fix my error, the error"
^^ attempted humour ^^ << failed dismally
repeated using different phrasing "Post the code with the error" at least the first ~20 lines

Instructions in case you don't know how
Open the file F:\xampp\htdocs\lfs\site_globalfn.php
Copy it
click code in the reply toolbar
paste the code
click Insert code snippet
type this is the code I referred in my question
Click Submit your Reply

an array or sql likely has a spelling error : array['gld'] is referenced instead of array['gold'] etc
shi_ happens,
is often easy for others to find,
impossible to find yourself,
expect to see the correct name, so see the correct name.