Upload to Gallery code

OK, I am getting it. i added the new database and figured out how to properly set it up! I am still having the same problem with the refresh, is that the place it goes?