title: IOS Swift Alamofire.request post to php form
body: <p>Just beginning development here, I've been working to convert a html form to IOS Swift and need a bit of guidance. I'm using Alamofire and am unsure how to tie the submit button and the UITextlabels to the .POST request. Appreciate any assistance you can offer. I've been searching for some time without much luck.  Thanks!</p>
  
  <p>PHP fields on server:</p>
  
  <pre><code>$name = $_POST['name'];
  $email = $_POST['email'];
  </code></pre>
  
  <p>Swift code:</p>
  
  <pre><code>import UIKit
  import Alamofire
  
  class formViewController: UIViewController {
  
      @IBOutlet weak var nameText: UITextField!
      @IBOutlet weak var emailText: UITextField!
  
      @IBAction func submitButton(sender: UIButton) {
  
          let parameters: [String: AnyObject] = [:] // fill in your params
          let request = Alamofire.request(.POST, "http://testserver.com/form.php", parameters: parameters)
      }
  
      override func viewDidLoad() {
          super.viewDidLoad()
  
          // Do any additional setup after loading the view.
      }
  </code></pre>