0
I am developing a website where the administrator can view the registration data of all users who 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 on 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:
My main doubts are:
1) The line <a href="adm_vermaisAdm.php?id='$dado[id]'">Ver mais</a>
is stated the right way? I am in doubt because of the $given[id], I don’t know if it will work this 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?
From now on I thank everyone who answers
Thank you very much! I managed to display the data without problems :)
– BlackM00n_