title: Passing Values of Spans to php with AJAX
body: <p>thanks for taking the time.  I'm working on building a visual shopping cart into multiple pages of a parallax site.  Because each 'page' of the parallax forces open and close a form, I cannot use a continuous form.  To remedy this, I am using jquery to place the value of the choices on the preceding pages into one page, filling spans.</p>
  
  <p>I'd like to be able to grab these final choices from the dom using ajax to put them to a processing page to store the customers choice information, and check it against a dwolla transaction.  I haven't got to setting up the dwolla transaction and check yet, because I have not been able to get my data to the php processing page, and get it to return an echo-able value.  This is built off wordpress by the way, and allot of times, filters wordpress is implementing screw me up.</p>
  
  <p>Here's the site;  <a href="http://ecigjuiceclub.com" rel="nofollow">http://ecigjuiceclub.com</a></p>
  
  <p>Lets jump into the code!</p>
  
  <p>AJAX:</p>
  
  <pre><code>function post()
  {
      var name = $('#cname').val();
      var street1 = $('#cstreet').val();
      var street2 = $('#cstreet2').val();
      var city = $('#ccity').val();
      var state = $('#cstate').val();
      var zip = $('#czip').val();
      var email = $('#cemail').val();
      var phone = $('#cphone').val();
      var flavor = $('#cflavor').val();
      var strength = $('#cstrength').val();
      var refcode = $('#crefcode').val();
      $.post('process.php',{postname:cname,poststreet1:cstreet,poststreet2:cstreet2,postcity:ccity,poststate:cstate,postzip:czip,postemail:cemail,postphone:cphone,postflavor:cflavor,poststrength:cstrength,postref:crefcode},
      function(data)
      {
          $('#thankyou').html(data);
      });
  }
  </code></pre>
  
  <p>Php process.php</p>
  
  <pre><code>&lt;?php
  $name = $_POST['postname'];
  $street1 = $_POST['poststreet1'];
  $street2 = $_POST['poststreet2'];
  $city = $_POST['postcity'];
  $state = $_POST['poststate'];
  $zip = $_POST['postzip'];
  $email = $_POST['postemail'];
  $phone = $_POST['postphone'];
  $flavor = $_POST['postflavor'];
  $strength = $_POST['poststrength'];
  $refcode = $_POST['postref'];
  
  if($zip == 90804)
  {
      echo "1";
  }
  else
  {
    echo "0";
  }
  ?&gt;
  </code></pre>
  
  <p>HTML Snippet (where in the DOM I'm attempting to grab):</p>
  
  <pre><code>&lt;span style="color:#EF5D3D;"&gt;Email:  &lt;/span&gt;&lt;span style="font-size:28px;" id="cemail"&gt;&lt;/span&gt;
  &lt;span style="color:#EF5D3D;"&gt;Phone:  &lt;/span&gt;&lt;span style="font-size:28px;" id="cphone"&gt;&lt;/span&gt;
  </code></pre>