1
People I’m not able to do something, I’m beginner in php and web programming and I’m trying to make a page to receive the ID of any user through a click on the link:
`while($linha = mysqli_fetch_array($result) ) {
$id_usuario = $linha['ID_usuario'];
$name = $linha['nome'];
$Sexo= $linha['sexo'];
echo "<tr> <td><a href='#'>$id_usuario</a></td> <td>$name</td> <td>$Sexo</td> <td>Tipo</td> </tr>"; //falta definir a pagina
}`
It’s a simple procedure I believe, on the other page I’d like you to take the user id and do a Select in all the information of this user registered at the bank, but I want to know how I could do it on this other page
Number one: NEVER USE GET TO PASS USER AND PASSWORD. Second, take a look here in the same Stack, there are HUNDREDS of login examples using PDO, which is currently the most secure. Here’s a great example: http://blog.thiagobelem.net/como-crea-um-system-de-login-niveis-permissao
– Diego
Thank you Diego, I’ve already studied it
– Rafael Nobrega
@Diego PDO is no safer than mysqli. Using it right, mysqli is even safer, because the PDO by default simulates the Prepared statements, different from the mysqli that makes native. The only "advantage" that PDO has that makes it easier to exchange DB, which usually only makes sense in larger libraries (and even then, if the library is well optimized, it will give preference to native Enginers).
– Bacco
@Bacco, my bad. I gave a personal opinion on security, without technical basis. Thank you for the clarification.
– Diego
@Diego Remembering that both lend themselves well to the service, I just didn’t want to leave the poor mysqli taking bad fame to some kkk
– Bacco