What is .upload()? Does it come from a library/plugin? If so, what one?
Does the move_uploaded_file() call get executed successfully?
From the events you describe it sounds to me like the form is being submitted straight to page3.
The code you've posted seems very incomplete (missing javascript, missing form fields, missing where $_SESSION members a b and c are set). You should create a minimalistic example and post the complete code.