Inside this input there is an ID number, I would use this ID to do a search in the database. how do I get this ID that is in an input text and "game" in php so I use it as a search? should one do something like this? below:
<form method="get" action="">
Valor ID <input type="text" name="id-da-tabela-para-modal" id="id-da-tab-para-modal">
</form>
For now it looks like this:
<div class="modal-body">
Valor ID <input type="text" name="id-da-tabela-para-modal" id="id-da-tab-para-modal">
<?php
require('conexao.php');
$id = $_GET['id-da-tab-para-modal'];
$resultado = mysql_query("select * from jogo Where ID=$id");
echo "<table class='table'>".
"<thead>".
"<tr>".
"<td>ID</td>".
"<td>Nome</td>".
"<td>Conta</td>".
"<td>Resultado</td>".
"<td>Valor Digitado</td>".
"<td>Dificuldade</td>".
"<td>Score</td>".
"</tr>".
"</thead>";
echo "<tbody>";
while($valores=mysql_fetch_array($resultado)){
echo "<tr>".
"<td>".$valores['ID']."</td>".
"<td>".$valores['nome']."</td>".
"<td>".$valores['conta']."</td>".
"<td>".$valores['resultado']."</td>".
"<td>".$valores['dificuldade']."</td>".
"<td>".$valores['totalacertos']."</td>".
"</tr>";
}
echo "</tbody></table>";
@mysql_close(conexao);
?>
</div>
It's not working.