Pass text field value between ViewController

i am making a sign up page and i want the textfield.text to be passed to the other view controller but when i run the app the text that i entered are missing

here is the code in firstViewController

@IBAction func NextButtonTapped(_ sender: Any) {
print("next")

let destination = storyboard?.instantiateViewController(withIdentifier: "uploadProof") as! UploadProofViewController

destination.emailPassed = emailTextfield.text!

destination.passwordPassed = passwordTextfield.text! 

}

and here is how i get them in thirdViewController:

i put a global variable-

var passwordPassed: String = ""

var emailPassed: String = ""

and lastly i make a parameter for the registration:

@IBAction func registerButtonTapped(_ sender: Any) {

        let parameters: Parameters=["email":emailPassed, "password":passwordPassed]

         print(parameters)

        //Sending http post request

        Alamofire.request(URL_USER_REGISTER, method: .post, parameters: parameters).responseJSON {
            response in
            //printing response
            print(response)

            //getting the json value from the server
            if let result = response.result.value {

                //converting it as NSDictionary
                let jsonData = result as! NSDictionary


                //displaying the message in label
                self.labelMessage.text = jsonData.value(forKey: "message") as! String?
            }
        }
    }

and this is what i get i run the app:

["email": "", "password": ""]
SUCCESS: {
    error = 1;
    message = "Required parameters are missing";
}

please help me