Well, I didn't mean that was the only problem, but it was certainly one of them.
Did you take heed of tnowalk's comments? Since the user is being redirected at the
statement, the 'gold' is never being set and is therefore, not available in index2.php.
Frankly, your code is a bit of a mess. I can see where you are "trying different things", but not cleaning up after them. That's going to cause problems somewhere down the line. Twice in index2.php you establish a mysql connection and select a database, only to do nothing with them.
if($field == 0)
has been defined as a constant, this will not function. In fact, had you proper error reporting / handling enabled, php would have told you this.
Also, ANY time you find yourself writing code like the above, where a condition results in something like "// show nothing", you really need to re-think the logic.
There may well be other problems, but with code like this you are really going to have to step through it, fixing one problem at a time.