title: How to make an input identifies an table id, then get the corespondent row and change another value of that row?
body: <p>I have some tables stored in the database (MySQL), then i created a table to show the fields as i want like this: <a href="http://prntscr.com/6mkyii" rel="nofollow">http://prntscr.com/6mkyii</a></p>
  
  <p>Here's the .php and javascript code (obviously, it won't work because im not connecting to my local database, but it's just to better understanding ^^): <code>https://jsfiddle.net/4zuq8qfy/</code></p>
  
  <pre><code>    $consulta = mysqli_query($link, "SELECT * FROM jogadores"); //CONSULTA BANCO DE DADOS
      $tabela = $consulta-&gt;fetch_all(MYSQLI_ASSOC); //ORDENA OS DADOS
      $colunas = mysqli_num_fields($consulta); //PEGA O NUMERO DE COLUNAS
      $rows = $consulta-&gt;num_rows; //PEGA O NUMERO DE LINHAS
  </code></pre>
  
  <p>My wish is link these left buttons (green plus), to alter some values in db. I set their names as 1, 2, 3.. 40, with js because i needed differentiate one from another, and these values were set thinking on the id_jogador ("id_player"). I'm trying so many ways to interact php and javascript, or even jquery, but i'm not getting anywhere. My last try was make the buttons an submit input, then alter the table, direct from php. But i can't differentiate those buttons with only php, and i cant compare button's name with the id_player that i want to. I would like to understand how do i compare these values, then through the id's, i change another field value of that row.</p>
  
  <p><strong>TL/DR</strong>: I want to compare an element name (or something that identifies it) with the id_jogador from a table (jogadores), then, through the id, get the correspondent row and change another field there, like name_jogador or age_jogador. Posted my codes</p>
  
  <p>PS.: i heard about ajax, but i don't know if it can helps me like i need.
  PS2.: i don't want at all the simple code, i would like to understand too !</p>
  
  <p>Im so newbie with php and even more with databases. I apologize if this code has something really wrong. Thank you ! :D </p>