title: Extract value from jQuery and pass into $_GET or a php variable
body: <p>I'm new to jQuery (or all things javascript, really) but know my way around php and basic programming - sorry if my question sounds utterly stupid, trying my best to learn.</p>
  
  <p>I'm using a seat selection jQuery script outlined on <a href="http://techbrij.com/780/seat-reservation-with-jquery" rel="nofollow">TechBrij</a></p>
  
  <p>This is the part of the code that selects the seat (from a layout of airplane/bus seats)</p>
  
  <pre><code>$('.' + settings.seatCss).click(function () {
      if ($(this).hasClass(settings.selectedSeatCss)){
          alert('This seat is already reserved');
      } else{
          $(this).toggleClass(settings.selectingSeatCss);
      }
  });
  $('#btnShowNew').click(function () {
      var str = [], item;
      $.each($('#place li.' + settings.selectingSeatCss + ' a'), function (index, value) {
          item = $(this).attr('title');
          str.push(item);
      });
      alert(str.join(','));
  })
  </code></pre>
  
  <p>The selected Seat(s) are shown in an alert window on a click of a button &amp; I want exactly that value.</p>
  
  <p>I now want to pass the selected seat number into <code>$_GET</code> (or just into a php variable which I can then use as a <code>$_GET</code> value and just continue with it in PHP). If I understand it right I somehow need to grab the variable "str"? How would I do that? </p>
  
  <p>Also, is there a way to limit the script to only allow ONE selected seat at a time? Right now it will only give an alert if I click on an already booked seat, I can select as many seats as I like, toggle them selected/unselected and such. Just setting it up that click on a seat set to "selectingSeatCss" will result in an alert would also stop me from unselecting it I guess.</p>