title: How to do addition between two dropdown menus containing 1-5?
body: <p>This is the code I have so far. I'm trying to use two dropdown menus in my HTML form that contains a 1-5 each and simply add them using POST.</p>
  
  <p>//action for dropdown menu addition</p>
  
  <pre><code>        $dropdownValueA = $_POST["dropdown1"];
          $dropdownValueB = $_POST["dropdown2"];          
          $valueone = 0;
          $valuetwo = 0;
          if ($dropdownValueA == "1a"){
              $valueone = 1;
          }
          if ($dropdownValueA == "2a"){
              $valueone = 2;
          }
          if ($dropdownValueA == "3a"){
              $valueone = 3;
          }
          if ($dropdownValueA == "4a"){
              $valueone = 4;
          }
          if ($dropdownValueA == "5a"){
              $valueone = 5;
          }
          if ($dropdownValueB == "1b"){
              $valuetwo = 1;
          }
          if ($dropdownValueB == "2b"){
              $valuetwo = 2;
          }
          if ($dropdownValueB == "3b"){
              $valuetwo = 3;
          }
          if ($dropdownValueB == "4b"){
              $valuetwo = 4;
          }
          if ($dropdownValueB == "5b"){
              $valuetwo = 5;
          }
  
          echo $valueone + $valuetwo;
  </code></pre>