title: 2 sets of radio button php my sql
body: <p>I am making a survey system for my college project. But I'm having a hard time with radio buttons. I successfully made 1 set of radio button and it values is being sent to my database. But when I make two sets of radio button, only the first set of radio button is being sent to my database. can someone help me?</p>
  
  <pre><code>if (isset($_GET['Submit1']) &amp;&amp; isset($_GET['q']) &amp;&amp; isset($_GET['q1'])) {
  
      $selected_radio = $_GET['q'];
      $selected_radio2 = $_GET['q1'];
  
  
  
      $idNumber = $_GET['h1'];
  
  
  
  $user_name = "root";
  $password = "";
  $database = "survey";
  $server = "127.0.0.1";
  
  $db_found = new mysqli($server,$user_name, $password, $database );
  
      if ($db_found) {
  
          if($selected_radio == "A") {
              $votedSQL = "UPDATE tblsurvey SET VotedA = VotedA + 1 WHERE ID = ?";
              $voteMessage = insert_vote($db_found, $votedSQL, $idNumber);
          }
          else if($selected_radio == "B"){
              $votedSQL = "UPDATE tblsurvey SET VotedB = VotedB + 1 WHERE ID = ?";
              $voteMessage = insert_vote($db_found, $votedSQL, $idNumber);
          }
          else if($selected_radio == "C"){
              $votedSQL = "UPDATE tblsurvey SET VotedC = VotedC + 1 WHERE ID = ?";
              $voteMessage = insert_vote($db_found, $votedSQL, $idNumber);
          }
          else if($selected_radio2 == "D") {
              $votedSQL = "UPDATE tblsurvey SET VotedD = VotedD + 1 WHERE ID = ?";
              $voteMessage = insert_vote($db_found, $votedSQL, $idNumber);
          }
          else if($selected_radio2 == "E"){
              $votedSQL = "UPDATE tblsurvey SET VotedE = VotedE + 1 WHERE ID = ?";
              $voteMessage = insert_vote($db_found, $votedSQL, $idNumber);
          }
          else if($selected_radio2 == "F"){
              $votedSQL = "UPDATE tblsurvey SET VotedF = VotedF + 1 WHERE ID = ?";
              $voteMessage = insert_vote($db_found, $votedSQL, $idNumber);
          }
          else {
              print "Error - could not record vote";
          }   
      }
  }
  
  else {
      print "You didn't select a voting option!";
  </code></pre>