I am getting the undefined index error as I come for the first time in my upload form page or if I move to next page and click on back button then I have the same error mess
The error is probably in your upload class. The error message is pretty clear, if that is the actual message you get there is probably a line somewhere in that class that looks for an array key I that is named 'fileUpload'.
Just do a search in your code for 'fileUpload', and add something to check if the key is set, ie
if(isset($arraywhatever['fileUpload'])) condition to your code.