title: Inserting values into database using PDO in Jquery AJAX PHP
body: <p>I'm still learning PHP and I'm trying to insert new values to the database using a dropdown. So far this is what I've made:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;table class="table"&gt;
  &lt;tr&gt;
      &lt;th&gt;Employee Name&lt;/th&gt;
      &lt;th&gt;Time&lt;/th&gt;
      &lt;th&gt;Priority&lt;/th&gt;
      &lt;th&gt;Assignee&lt;/th&gt;
      &lt;th&gt;Subject&lt;/th&gt;
      &lt;th&gt;Problem&lt;/th&gt;
      &lt;th&gt;Status&lt;/th&gt;
  &lt;/tr&gt;
  &lt;?php
  include ('database.php');
  $result = $database-&gt;prepare ("SELECT * FROM tickets order by ticketno DESC");
  $result -&gt;execute();
  for ($count=0; $row_message = $result -&gt;fetch(); $count++){
  ?&gt;
  &lt;tr&gt;
      &lt;td&gt;&lt;?php echo $row_message['full_name']; ?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $row_message['time']; ?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $row_message['priority']; ?&gt;&lt;/td&gt;
      &lt;?php if ($row_message['assignee']) : ?&gt;
      &lt;td&gt;&lt;?php echo $row_message['assignee']; ?&gt;&lt;/td&gt;
      &lt;?php else : ?&gt;
      &lt;td&gt;
          &lt;form method="post" action="update1.php"&gt;
              &lt;input type="hidden" name="ticketno" value="&lt;?php echo $row_message['ticketno']; ?&gt;" /&gt;
              &lt;input type="submit" name="accept" value="Accept"&gt;&lt;/input&gt;
          &lt;/form&gt;
      &lt;/td&gt;
      &lt;?php endif ; ?&gt;
      &lt;td&gt;&lt;?php echo $row_message['subject']; ?&gt;&lt;/td&gt;
      &lt;td&gt;&lt;?php echo $row_message['problem']; ?&gt;&lt;/td&gt;
      &lt;td&gt;
          &lt;label for=""&gt;&lt;/label&gt; &lt;select style="font-family: Questrial;" name="status" required&gt;
              &lt;option disabled selected hidden&gt;Select Status&lt;/option&gt;
              &lt;option name="status" value="In Progress"&gt;In Progress&lt;/option&gt;
              &lt;option name="status" value="Closed: Cancelled"&gt;Closed: Cancelled&lt;/option&gt;
              &lt;option name="status" value="Closed: Solved"&gt;Closed: Solved&lt;/option&gt;
          &lt;/select&gt;
      &lt;/td&gt;
  &lt;/tr&gt;
  &lt;?php    }    ?&gt;
  &lt;/table&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I also got a sample script:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;script&gt;
  $(document).ready(function(){
   $('input[type="radio"]').click(function(){
   var gender = $(this).val();
   $.ajax({
   url:"insert.php",
   method:"POST",
   data:{gender:gender},
   success: function(data){
   $('#result').html(data);
   }
   });
   });
  });
  &lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>My concern is, I'm not sure what should be my <code>('input[type="radio"]')</code> if I'm using a dropdown.</p>
  
  <p>Here's my table schema:</p>
  
  <p>Table Schema
  <img src="https://i.stack.imgur.com/9uVuR.png" alt="image description"></p>