Next: when the user clicks "apply", he will go to another page and work with the id of the record he clicked, so that is the problem, I do not know how to do it. codes:
pag_listar_call:
foreach ($chamados as $chamado):
?>
<tr>
<td><?php echo $chamado['data_solicitado'] ?></td>
<td><?php echo $chamado['detalhes'] ?></td>
<td><?php echo $chamado['logradouro'] ?></td>
<td><?php echo $chamado['estado'] ?></td>
<td><?php echo $chamado['cidade'] ?></td>
<td><?php echo $chamado['bairro'] ?></td>
<td><?php echo $chamado['num'] ?></td>
<td><?php echo $chamado['complemento'] ?></td>
<td><?php echo $chamado['ddd'] ?></td>
<td><?php echo $chamado['numero'] ?></td>
<td><?php echo $chamado['nome'] ?></td>
<td><?php echo $chamado['sobrenome'] ?></td>
<td><a onclick="verificaAlistamento()">Candidatar-se</a></td>
<?php
$chamado['id_contrato'];
?>
</tr>
<?php
endforeach;
pag_verify
$user = $_SESSION['nome'];
$idContrato = $_POST[$id_contrato];
$cpf = pegaCpfUsuarioLogado($conexao, $user);
if(verificaCandidatura($conexao, $cpf)){
?>
<script>deuRuim()</script>
<?php
candidatarSe($conexao, $cpf, $idContrato);
header("location: pag_menuTecnico.php");
} else {
?>
<script>deuBom()</script>
<?php
header("location: pag_menuTecnico.php");
}
I already tried to do this: link
Just stopped calling open calls