Código PHP :
<?php $conexion = mysql_connect("localhost", "xxxxxxx", "xxxxxxxx"); mysql_select_db("xxxxxxxxx", $conexion); $queEmp = "SELECT * FROM registro_usuarios ORDER BY username"; $resEmp = mysql_query($queEmp, $conexion) or die(mysql_error()); $totEmp = mysql_num_rows($resEmp); ?> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>mostrar datos</title> <style type="text/css"> <!-- body { font-family: "Trebuchet MS", Tahoma, Verdana; font-size: 12px; font-weight: normal; color: #666666; text-decoration: none; padding: 20px; } h4 { color: #CC0000; } --> </style> </head> <body> <?php if ($totEmp> 0) { while ($rowEmp = mysql_fetch_assoc($resEmp)) { echo '<a href=perfil.php?username='.$rowEmp['username'].'>'.$rowEmp['username'].'</a><br />'; } } ?> </body> </html>