Swift4:how to pass textfield text to another ViewController.swift

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) {

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]


        //Sending http post request

        Alamofire.request(URL_USER_REGISTER, method: .post, parameters: parameters).responseJSON {
            response in
            //printing 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 when i run the app:

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

i hope someone can help me