title: emailing a string gathered using jQuery
body: <p>I am trying to email a string that was collected from a web page via php, however I am not having any luck. Lots of info on making jQuery forms but can't find any that are simply emailing a string.</p>
  
  <p>here is what I have so far:</p>
  
  <pre><code> $('.questionFive').click(function(){
      $.post("mail.php", preSubmit()) 
   });
  
  // this works well, and returns the string as desired.
  function preSubmit(){
      var optionTexts = [];
      $("section").each(function(){
          var h2 = $(this).find("h2").text();
          optionTexts.push(h2);
          $("ol li", this).each(function() { optionTexts.push($(this).text()) });
          optionTexts.push("\n");
      });
      var optionString = optionTexts.toString();
      var splitText = optionString.split(",");
      alert(splitText);
      return splitText;
  }
  
  // mail.php file
  &lt;?php
  if (isset($_POST['mailstring']) {
      $mail = $_POST['mailstring'];
      mail('me@email.com', 'My Subject', $mail);
  }
  ?&gt;
  </code></pre>