title: Submitting a form in Sencha Touch 2
body: <p>I'm trying to submit a form with the standard form that was given in the SDK i downloaded.</p>
  
  <p>Anyone have any information on how it's passed? Any tips as to how to pass it?</p>
  
  <p>I'm trying to make a very simple submit form to collect some information. </p>
  
  <pre><code>{                    title: 'Register',
                      iconCls: 'add',
                      xtype: 'formpanel',
                      url: 'contact.php',
                      layout: 'vbox',
                      scrollable: true,
  
  
  
                      items: [
                          {
                              xtype: 'fieldset',
                              title: 'Opt In',
                              instructions: 'Want more info on Monster Energy? Opt-in to receive updates. ',
  
                              items: [
                                  {
                                      xtype: 'textfield',
                                      label: 'First Name',
                                      name: 'fname',
                                  },
                                  {
                                      xtype: 'textfield',
                                      label: 'Last Name',
                                      name: 'lname',
                                  },
                                  {
                                      xtype: 'emailfield',
                                      label: 'Email',
                                      name: 'email',
                                  },
                                  {
                                      xtype: 'numberfield',
                                      label: 'Phone',
                                      name: 'phone',
                                  }
                              ]
                          },
                          {
                              xtype: 'button',
                              text: 'Send',
                              ui: 'confirm',
                              handler: function() {
                                  this.up('formpanel').submit();
                              }
                          }
                      ]
                  }
  </code></pre>
  
  <p>contact.php </p>
  
  <pre><code>&lt;?phpinclude_once "config.php";
  mysql_connect($dbhost, $dbuser, $dbpasswd);
  mysql_select_db($dbname) or die ("Cannot select db" . mysql_error());
  session_start();
  
  
  //***** Get today's date
  $today = date("Y-m-d H:i:s");
  $date = date("Y-m-d");
  
  
  $firstName = addslashes($_POST['fname']);
  $lastName = addslashes($_POST['lname']);
  $email = $_POST['email'];
  $phone = $_POST['phone'];
  
  
  $sql = "INSERT INTO customer_31
              (mb_firstName, 
              mb_lastName,
              mb_phone,
              mb_email,
              mb_date_entered) 
              VALUES 
              ('$firstName', 
              '$lastName', 
              '$phone',
              '$email')";
  
  
  
  
  header("location:index.php");
  exit();
  
  ?&gt;
  </code></pre>