Hi jmr3460,
In answer to your section question, yes you can upload files like images and data files to a MYSQL database, using the BLOB field type, however, for improved performance, it is usually better to upload files to the server and reference them in the database (ie. put the path to the file in the database and use that to find the file that you uploaded to the server).
And yes you can use global variables but it's not a good idea. Here's some reading:
http://blog.case.edu/gps10/2006/07/22/why_global_variables_in_php_is_bad_programming_practice
http://c2.com/cgi/wiki?GlobalVariablesAreBad
Cheers