title: Select option only affects row one - php-jquery-mysql
body: <p><strong>Hi ! I used mysqli for my connection in database.<a href="https://i.stack.imgur.com/6Xt4E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6Xt4E.png" alt="enter image description here"></a></strong>
  My problem is the second and the  following rows is not affected whenever I select new option in . 
  Can you guys please help me to solve this. 
  <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>$(document).ready(function ()
   {
    $('#dealer').change(function () 
    {
     $("#tt").val($(this).val());
    }); 
   });
   </code></pre>
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.2.3/jquery.min.js"&gt;&lt;/script&gt;
  &lt;body&gt;
    &lt;table&gt;
    &lt;tr&gt;
     &lt;th&gt;USERNAME&lt;/th&gt;
     &lt;th&gt;PASSWORD&lt;/th&gt;
     &lt;th&gt;CURRENT USER TYPE&lt;/th&gt;
     &lt;th&gt;CHANGE USER TYPE&lt;/th&gt;
     &lt;th&gt;UPDATE&lt;/th&gt;
     &lt;th&gt;DELETE&lt;/th&gt;
    &lt;/tr&gt;
    &lt;?php
    while($row= mysqli_fetch_array($records))
    {
     //echo "&lt;tr&gt;&lt;form action='super_admin_function_edit.php' method='post'&gt;";
     echo "&lt;tr&gt;&lt;form action=super_admin_function_edit.php method=post&gt;";
     echo "&lt;td&gt;&lt;input type=text name=emp_username value='".$row['emp_username']."'&gt;&lt;/td&gt;";
     echo "&lt;td&gt;&lt;input type=text name=emp_password value='".$row['emp_password']."'&gt;&lt;/td&gt;";
     echo "&lt;td&gt;&lt;input type=text name=emp_type id=tt value='".$row['emp_type']."'&gt;&lt;/td&gt;";
     
     //echo "&lt;td&gt;&lt;input type='text' id='tt' &lt;/td&gt;";
     
     
     echo " &lt;td&gt;&lt;select name='dealer' id='dealer'&gt;
        &lt;option value='0'&gt;---- select Dealer -----&lt;/option&gt;
        &lt;option value='1'&gt;---- select Dealer1 -----&lt;/option&gt;
        &lt;option value='2'&gt;---- select Dealer2 -----&lt;/option&gt;     
       &lt;/select&gt;
       &lt;/td&gt;";
       
     echo "&lt;input type=hidden name=emp_id value='".$row['emp_id']."'&gt;&lt;/td&gt;";
     echo "&lt;td&gt;&lt;input type=submit&gt;&lt;/td&gt;";
     echo "&lt;td&gt;&lt;input type=submit value=Delete&gt;&lt;/td&gt;";
     echo "&lt;/form&gt;&lt;/tr&gt;";
    }
    ?&gt;
  
   &lt;/body&gt;</code></pre>
  </div>
  </div>
  </p>