0
I would like to return the value of all my table to a change form or something, when clicked on my btn "see more", below the print of my screen:
My code:
echo '<form action="vermais.php" method="POST" accept-charset="utf-8" >';
echo '<table class="table">';
echo '<tr>';
echo '<td>Protocolo</td>';
echo '<td>Nome</td>';
echo '<td>Setor</td>';
echo '<td>E-mail</td>';
echo '<td>Prioridade</td>';
echo '<td>Data cadastrada</td>';
echo '<td>Status</td>';
echo '</tr>';
while($registro = mysqli_fetch_assoc($sql)){
$id=$registro['id_status'];
$st = ("SELECT * FROM status WHERE id=$id");
$sql2 = mysqli_query($conexao,$st);
$row = mysqli_fetch_array($sql2);
$s = $row['nome'];
if("Em analise" == $s){
$cor="blue";
}else if("Aprovado" == $s){
$cor="green";
}else if("Pendente" == $s){
$cor = "purple";
}else{
$cor = "red";
}
echo '<tr>';
echo '<td>'.$registro["protocolo"].'</td>';
echo '<td>'.$registro["nome"].'</td>';
echo '<td>'.$registro["setor"].'</td>';
echo '<td>'.$registro["email"].'</td>';
echo '<td>'.$registro["prioridade"]. '</td>';
echo '<td>'.$registro["data_cadastro"]. '</td>';
echo '<td style="color:'.$cor.'">'.$row["nome"].'</td>';
if($s !='Aprovado'){
echo '<td> <button type="submit" class="btn btn-primary">Ver mais</button>';
}
echo '</tr>';
}
echo '</table>';
echo '</form>';
The protocol field would be unique?
– user60252