title: How to I use several buttons in html to set values for my website and then one button that submits all the data?
body: <p>I'm looking to have several buttons in my php website that set different values based on the button selected and then have the final button set a value and then submit all of these to the next php page. So here I have two sets of buttons that need to be set inside of a form:</p>
  
  <pre><code>&lt;form id="formUploadFile"  action="&lt;?php echo $uploadHandler ?&gt;" enctype="multipart/form-data" method="post" &gt; 
      &lt;p&gt; 
          &lt;input type="hidden" name="MAX_FILE_SIZE" value="&lt;?php echo $max_file_size ?&gt;"&gt; 
      &lt;/p&gt; 
  
      &lt;p align="left"&gt; 
          &lt;label for="file" &gt;First, Choose your image!&lt;/label&gt; 
          &lt;input type="file" name="files[]"  /&gt; 
      &lt;/p&gt; 
  
      &lt;p&gt;
          &lt;h5&gt;Would you like to use colored pencils or paint?&lt;/h5&gt;
          &lt;div class="btn-group"&gt;
              &lt;button class="btn btn-primary" name="ToolChoice" value="0"&gt;Colored Pencils&lt;/button&gt;
              &lt;button class="btn btn-primary" name="ToolChoice" value="1"&gt;Paint&lt;/button&gt;
            &lt;/div&gt;
      &lt;/p&gt;
      &lt;p class="text-center"&gt; 
          &lt;h5&gt;Then, Choose your Difficulty!&lt;/h5&gt;
              &lt;div class="btn-group"&gt;
              &lt;button type="submit" class="btn btn-success" name="DifficultyChoice" value="0" onclick="loadingCircle()"&gt;Kids&lt;/button&gt;
              &lt;button type="submit" class="btn btn-success" name="DifficultyChoice" value="1" onclick="loadingCircle()"&gt;Novice&lt;/button&gt;
              &lt;button type="submit" class="btn btn-success" name="DifficultyChoice" value="2" onclick="loadingCircle()"&gt;Intermediate&lt;/button&gt;
              &lt;button type="submit" class="btn btn-success" name="DifficultyChoice" value="3" onclick="loadingCircle()"&gt;Advanced&lt;/button&gt;
            &lt;/div&gt;
  
      &lt;/p&gt; 
  
      &lt;/form&gt;   
  </code></pre>
  
  <p>I want the user to first choose their "ToolChoice" and then choose their "DifficultyChoice" and to have both values posted to the $uploadHandler. However, as written, only the "DifficultyChoice is being sent. On the php end I'm just using</p>
  
  <pre><code>$difficulty=$_POST['DifficultyChoice'];
  $toolChoice=$_POST['ToolChoice'];  
  </code></pre>
  
  <p>I understand this is because I'm not using submit for the toolchoice, but I do not want to run the php $uploadHandler for each of these values separately. Rather, I need both set and sent at the same time.</p>
  
  <p>Any help is appreciated!   </p>