title: How can i make toggle-able html buttons POST to php
body: <p>I am trying to make an html/php email form that includes multiple text fields, 4 toggle-able buttons, and a submit button. I have been successful in getting the buttons to change states when clicked, but I can't figure out how to check whether the button has actually been pressed in PHP. </p>
  
  <p>Here is my html code of all of my buttons. They are wrapped in a form that contains the submit button and other text fields. I also tried changing the button tags to input tags.</p>
  
  <pre><code>&lt;section&gt;
      &lt;button class="btn service-button" name="app" value="Web App" type="button"&gt;Web App&lt;/button&gt;
      &lt;button class="btn service-button" name="brand" value="Branding" type="button"&gt;Branding&lt;/button&gt;
      &lt;button class="btn service-button" name="design" value="Web Design" type="button"&gt;Web Design&lt;/button&gt;
      &lt;button class="btn service-button" name="other" value="Other" type="button"&gt;Other&lt;/button&gt;
  &lt;/section&gt;
  </code></pre>
  
  <p>My php for just the buttons:</p>
  
  <pre><code>if(isset($_POST['app'])) {
      $service .= $_POST['app'];
  }
  if(isset($_POST['brand'])) {
      $service .= ", " . $_POST['brand'];
  }
  if(isset($_POST['design'])) {
      $service .= ", " . $_POST['design'];
  }
  if(isset($_POST['other'])) {
      $service .= ", " . $_POST['other'];
  }
  </code></pre>
  
  <p>I tried a vardump($_POST); but they are apparently not even added to the $_POST.
  Any idea what I can try to get them to actually submit data to the $_POST? I was thinking about doing something like: </p>
  
  <pre><code>if(class_exists('active-button')) {
      $service .= //Set data here somehow.
  }
  </code></pre>
  
  <p>but I'm not quite sure how I would do that since there are four different buttons and any combination of them can be selected.</p>
  
  <p>Also, shouldn't affect anything I don't think, but here is my jquery for changing the buttons:</p>
  
  <pre><code>$(".btn").click(function() {
      //Add/remove active-button and service-button. Replaces one with the
      //other depending on the current state.
      $(this).toggleClass("active-button").toggleClass("service-button");
  });
  </code></pre>
  
  <p>The active-button and service-button classes are simply used in the css the change the style of the button to </p>