Oi pessoal, tudo bem...
Estou precisando clicar em uma linha da tabela e abrir outra página com os valores dessa linha que cliquei, sou novato e só conheço um pouco de php e HTML
Poderiam me ajudar por favor?
<?php
session_start();
include_once("conectbusca.php");
$pesquisaunid = $_POST['Unidade']; ?>
<html>
<head>
<title>Ranking</title>
<link rel="stylesheet" type="text/css" href="estiloranking.css">
</head>
<body>
<table class="tabela" style='width:1272px'> <!-- Criando tabela: -->
<tr>
<th style='width:370px'>nome</th>
<th>CPF</th>
<th> colocação </th>
<th> Pontos/km </th>
<th> Total km </th>
<th> Total Pontos </th>
<th> Motor Ocioso </th>
<th> Excesso Velocidade </th>
<th> Freada Brusca </th>
<th> Curva Brusca </th>
</tr>
<?php //Trazendo os dados do banco
$sql = "SELECT * FROM tb_motoristas WHERE Unidade = '$pesquisaunid' AND Perfil = '$pesquisa'";
$resultado = mysqli_query($strcon,$sql) or die("Erro ao retornar dados");
$row = mysqli_num_rows($resultado);
/*echo "$row";*/
if ($row == 0) {
header("Location: login2.php");}
// Obtendo os dados por meio de um loop while
while ($registro = mysqli_fetch_array($resultado)) {
$nome = $registro['Nome'];
$cpf = $registro['CPF'];
$unidade = $registro['Unidade'];
$clocal = $registro['Coloc_local'];
$cgeral = $registro['Coloc_geral'];
$tkm = $registro['Total_km'];
$tpontos = $registro['Total_pontos'];
$mocioso = $registro['Motor_ocioso'];
$velocidade = $registro['Velocidade'];
$freada = $registro['Freada'];
$curva = $registro['Curva'];
echo "<tr>";
echo "<td><a href='prontuario.php'>".$nome."</td>";
echo "<td>".$cpf."</td>";
echo "<td align='center'>".$clocal."</td>";
echo "<td align='center'>".$cgeral."</td>";
echo "<td align='center'>".$tkm."</td>";
echo "<td align='center'>".$tpontos."</td>";
echo "<td align='center'>".$mocioso."</td>";
echo "<td align='center'>".$velocidade."</td>";
echo "<td align='center'>".$freada."</td>";
echo "<td align='center'>".$curva."</td>";
echo "</tr>";
} mysqli_close($strcon);
echo "</table>";?>
</body>
</html>