I'm developing a site where the administrator can view the cadastral data of all the users that are registered in the system, and this data is displayed in a table. The table only displays some data (id, name and email) and I want to make a link where the administrator can click to see the complete information of the selected user. For example, if he clicks the "see more" link of the user with ID 1, the screen displays all his data (id, name, rg, cpf, email, date of birth).
My code for now is this:
<?php
$consulta = "SELECT * FROM adms";
$con = mysqli_query($con, $consulta) or die (mysqli_error);
?>
<table border="1" cellpadding="25px;">
<tr>
<td>ID</td>
<td>Nome</td>
<td>E-mail</td>
<td></td>
</tr>
<?php while($dado = $con->fetch_array()){ ?>
<tr>
<td><?php echo $dado['id'] ?></td>
<td><?php echo $dado['nome'] ?></td>
<td><?php echo $dado['email'] ?></td>
<td><a href="adm_vermaisAdm.php?id='$dado[id]'">Ver mais</a></td>
</tr>
<?php } ?>
</table>
The table looks like this:
Mymainquestionsare:
1)Isthe<ahref="adm_vermaisAdm.php?id='$dado[id]'">Ver mais</a>
line declared in the right way? I am in doubt because of the given $ [id], I do not know if it will work that way.
2) To create the data display page, its name would be adm_vermaisAdm.php? id = '$ given [id]'?
3) To display this data, how do I get the URL ID?
Thank you all for responding